Camera2D Type
A 2D camera definition for the MonoGame backend.
Produces a transform matrix for SpriteBatch.Begin.
Mirrors the raylib Camera2D concept: position, zoom, rotation, and origin.
Use Camera2D.create to construct one and
Camera2D.toMatrix to get the SpriteBatch transform.
Record fields
| Record Field |
Description
|
The point on screen where the camera is anchored (typically viewport center).
|
|
World position the camera is centered on.
|
|
Full Usage:
Rotation
Field type: float32
|
Rotation in radians around the origin.
|
Full Usage:
Zoom
Field type: float32
|
Zoom factor (1.0 = no zoom, >1 = zoom in, <1 = zoom out).
|
Mibo