aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Camera.h
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-27 11:56:48 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-27 11:56:48 +0100
commit2b35e8f51a3536b62ea21dc82deec1e3b65568f6 (patch)
tree8245ca8f015634e0aca01e83822b02c869419b5c /src/crepe/api/Camera.h
parent7f66cd4a9b609f6bf36d005f5e38ef2a57d1c0d3 (diff)
make format and offset for the cameara relative from the transform gameobject
Diffstat (limited to 'src/crepe/api/Camera.h')
-rw-r--r--src/crepe/api/Camera.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/crepe/api/Camera.h b/src/crepe/api/Camera.h
index 151e5d9..1505107 100644
--- a/src/crepe/api/Camera.h
+++ b/src/crepe/api/Camera.h
@@ -28,17 +28,19 @@ public:
//! Background color of the camera view.
Color bg_color;
- //! pos The position of the camera in world units
- vec2 pos = {0,0};
+ //! offset postion from the game object transform component
+ vec2 offset = {0, 0};
+
+ //! pos the postion of the camera in world space this will be filled with
+ //pos = transform + offset
+ vec2 pos = {0, 0};
//! screen the display size in pixels ( output resolution )
- ivec2 screen = {1080,720};
+ ivec2 screen = {1080, 720};
//! viewport is the area of the world visible through the camera (in world units)
- //vec2 viewport = {1000, 2000};
ivec2 viewport = {500, 1000};
- //! scale scaling factor from world units to pixel coordinates
//! Zoom level of the camera view.
double zoom = 1.0f;