Refactor CameraController logic
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
namespace openVulkanoCpp
|
||||
{
|
||||
FreeCamCameraController::FreeCamCameraController(Scene::Camera* camera) : m_camera(camera)
|
||||
FreeCamCameraController::FreeCamCameraController(Scene::Camera* camera) : CameraController(camera)
|
||||
{
|
||||
auto input = Input::InputManager::GetInstance();
|
||||
m_actionForward = input->GetAction("forward");
|
||||
@@ -48,7 +48,7 @@ namespace openVulkanoCpp
|
||||
m_position += rot * vec;
|
||||
Math::Matrix4f camTransformation = Math::Utils::toMat4(rot);
|
||||
camTransformation[3] = Math::Vector4f(m_position, 1);
|
||||
m_camera->SetMatrix(camTransformation);
|
||||
GetCamera()->SetMatrix(camTransformation);
|
||||
}
|
||||
|
||||
void FreeCamCameraController::SetDefaultKeybindings()
|
||||
|
||||
Reference in New Issue
Block a user