aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/system')
-rw-r--r--src/crepe/system/RenderSystem.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/crepe/system/RenderSystem.cpp b/src/crepe/system/RenderSystem.cpp
index beed9ce..9a8c1ba 100644
--- a/src/crepe/system/RenderSystem.cpp
+++ b/src/crepe/system/RenderSystem.cpp
@@ -28,8 +28,11 @@ void RenderSystem::update_camera() {
for (Camera & cam : cameras) {
if (!cam.active) continue;
+ const Transform & transform
+ = mgr.get_components_by_id<Transform>(cam.game_object_id).front().get();
this->context.set_camera(cam);
this->curr_cam_ref = &cam;
+ this->curr_cam_ref->pos = transform.position + this->curr_cam_ref->offset;
}
}