From 817cec99feebb0b6e7e629e7fd92a0d54173e60f Mon Sep 17 00:00:00 2001 From: fallenoak Date: Sat, 21 Feb 2026 14:11:22 -0600 Subject: [PATCH] feat(ui): add CGCamera::Target --- src/ui/game/CGCamera.cpp | 4 ++++ src/ui/game/CGCamera.hpp | 1 + 2 files changed, 5 insertions(+) diff --git a/src/ui/game/CGCamera.cpp b/src/ui/game/CGCamera.cpp index f278f6e..bb9a454 100644 --- a/src/ui/game/CGCamera.cpp +++ b/src/ui/game/CGCamera.cpp @@ -80,6 +80,10 @@ void CGCamera::SetupWorldProjection(const CRect& projRect) { this->SetGxProjectionAndView(projRect); } +C3Vector CGCamera::Target() const { + return this->m_position + this->Forward(); +} + C3Vector CGCamera::Up() const { if (this->m_relativeTo) { return this->CSimpleCamera::Up() * this->ParentToWorld(); diff --git a/src/ui/game/CGCamera.hpp b/src/ui/game/CGCamera.hpp index b0aafb7..a23d789 100644 --- a/src/ui/game/CGCamera.hpp +++ b/src/ui/game/CGCamera.hpp @@ -27,6 +27,7 @@ class CGCamera : public CSimpleCamera { CGCamera(); C33Matrix ParentToWorld() const; void SetupWorldProjection(const CRect& projRect); + C3Vector Target() const; private: // Private member variables