Added PerspectiveCameraController

This commit is contained in:
Simon Lübeß
2021-08-04 19:23:29 +02:00
parent 0735aae74f
commit e04d058381
3 changed files with 137 additions and 4 deletions
+7 -2
View File
@@ -70,7 +70,8 @@ namespace Sandbox
EcsWorld _world = new EcsWorld() ~ delete _;
OrthographicCameraController _cameraController ~ delete _;
// OrthographicCameraController _cameraController ~ delete _;
PerspectiveCameraController _cameraController ~ delete _;
private Vector3 CircleCoord(float angle)
{
@@ -183,8 +184,12 @@ namespace Sandbox
InitEcs();
_cameraController = new OrthographicCameraController(Application.Get().Window.Context.SwapChain.BackbufferViewport.Width /
//_cameraController = new OrthographicCameraController(Application.Get().Window.Context.SwapChain.BackbufferViewport.Width /
// Application.Get().Window.Context.SwapChain.BackbufferViewport.Height);
_cameraController = new .(Application.Get().Window.Context.SwapChain.BackbufferViewport.Width /
Application.Get().Window.Context.SwapChain.BackbufferViewport.Height);
_cameraController.CameraPosition = .(0, 0, -5);
}
void InitEcs()