Class Camera2D_GD_CB_Extension
- Namespace
- Godot
- Assembly
- com.cobilas.godot.utility.dll
Extension for Godot.Camera2D class.
public static class Camera2D_GD_CB_Extension
- Inheritance
-
Camera2D_GD_CB_Extension
- Inherited Members
Methods
ScreenToWorldPoint(Camera2D, Vector2D)
Converts a position on the screen to a position in the 2D world.
public static Vector2D ScreenToWorldPoint(this Camera2D C, Vector2D mousePosition)
Parameters
CCamera2DThe 2D camera that will be used for conversion.
mousePositionVector2DThe position on the screen that will be converted.
Returns
- Vector2D
Return a two-dimensional vector with the result of converting the screen position to a position in the 2D world.
WorldToScreenPoint(Camera2D, Vector2D)
Converts a position in the 2D world to a position on the screen.
public static Vector2D WorldToScreenPoint(this Camera2D C, Vector2D position)
Parameters
CCamera2DThe 2D camera that will be used for conversion.
positionVector2DThe position of the 2D world that will be converted.
Returns
- Vector2D
Returns a two-dimensional vector with the result of converting the 2D world position to a screen position.