From 7dda8bdd251a9affcee4306aef6088ffb21e3bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20L=C3=BCbe=C3=9F?= Date: Wed, 25 Aug 2021 22:42:48 +0200 Subject: [PATCH] Added properties to PerspectiveCameraController --- .../src/PerspectiveCameraController.bf | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/GlitchyEngine/src/PerspectiveCameraController.bf b/GlitchyEngine/src/PerspectiveCameraController.bf index c97efe3..fcbf36f 100644 --- a/GlitchyEngine/src/PerspectiveCameraController.bf +++ b/GlitchyEngine/src/PerspectiveCameraController.bf @@ -21,6 +21,22 @@ namespace GlitchyEngine public PerspectiveCamera Camera => _camera; + public float TranslationSpeed + { + get => _cameraTranslationSpeed; + set => _cameraTranslationSpeed = value; + } + + public Vector2 RotationSpeed + { + get => .(_cameraRotationSpeedX, _cameraRotationSpeedY); + set + { + _cameraRotationSpeedX = value.X; + _cameraRotationSpeedY = value.Y; + } + } + public Vector3 CameraPosition { get => _cameraPosition; @@ -31,6 +47,39 @@ namespace GlitchyEngine UpdateCamera(); } } + + public Vector3 CameraRotation + { + get => _cameraRotation; + set + { + _cameraRotation = value; + + UpdateCamera(); + } + } + + public float FovY + { + get => _fovY; + set + { + _fovY = value; + + UpdateCamera(); + } + } + + public float AspectRatio + { + get => _aspectRatio; + set + { + _aspectRatio = value; + + UpdateCamera(); + } + } public this(float aspectRatio) {