Skip to content

Commit d94729c

Browse files
committed
Make the comments on the camera 2d fields more clear about what space each one is in.
1 parent 2d8e346 commit d94729c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/raylib.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,10 @@ typedef Camera3D Camera; // Camera type fallback, defaults to Camera3D
334334

335335
// Camera2D, defines position/orientation in 2d space
336336
typedef struct Camera2D {
337-
Vector2 offset; // Camera offset (displacement from target)
338-
Vector2 target; // Camera target (rotation and zoom origin)
339-
float rotation; // Camera rotation in degrees
340-
float zoom; // Camera zoom (scaling), should be 1.0f by default
337+
Vector2 offset; // Camera offset (screen space offset from window origin)
338+
Vector2 target; // Camera target (world space target point that is mapped to screen space offset)
339+
float rotation; // Camera rotation in degrees (pivots around target)
340+
float zoom; // Camera zoom (scaling around target), must not be set to 0, set to 1.0f for no scale
341341
} Camera2D;
342342

343343
// Mesh, vertex data and vao/vbo

0 commit comments

Comments
 (0)