Camera
Represents a 2D camera used for rendering.
Constructor
Represents a 2D camera used for rendering.
Properties
| Name | Description | Type |
|---|---|---|
pos | Get or set the camera's position. | Vec2 |
Methods
Set
set() → NoneSet this camera as the active one for rendering.
Only one camera can be active at a time.
World To Screen
world_to_screen(world_pos: Vec2) → Vec2Convert a world position to a screen position using this camera's translation.
Args
world_pos: The world position to convert.
Returns
Vec2 : The resulting screen position.