Some clean up
This commit is contained in:
parent
736d7b652b
commit
d32eb790ba
|
@ -18,33 +18,33 @@ namespace SHADE
|
|||
|
||||
if (SHInputManager::GetKey(SHInputManager::SH_KEYCODE::A))
|
||||
{
|
||||
system->editorCamera.position -= right * dt * camera.movementSpeed;
|
||||
system->editorCamera.dirtyView = true;
|
||||
camera.position -= right * dt * camera.movementSpeed;
|
||||
camera.dirtyView = true;
|
||||
}
|
||||
if (SHInputManager::GetKey(SHInputManager::SH_KEYCODE::D))
|
||||
{
|
||||
system->editorCamera.position += right * dt * camera.movementSpeed;
|
||||
system->editorCamera.dirtyView = true;
|
||||
camera.position += right * dt * camera.movementSpeed;
|
||||
camera.dirtyView = true;
|
||||
}
|
||||
if (SHInputManager::GetKey(SHInputManager::SH_KEYCODE::W))
|
||||
{
|
||||
system->editorCamera.position += view * dt * camera.movementSpeed;
|
||||
system->editorCamera.dirtyView = true;
|
||||
camera.position += view * dt * camera.movementSpeed;
|
||||
camera.dirtyView = true;
|
||||
}
|
||||
if (SHInputManager::GetKey(SHInputManager::SH_KEYCODE::S))
|
||||
{
|
||||
system->editorCamera.position -= view * dt * camera.movementSpeed;
|
||||
system->editorCamera.dirtyView = true;
|
||||
camera.position -= view * dt * camera.movementSpeed;
|
||||
camera.dirtyView = true;
|
||||
}
|
||||
if (SHInputManager::GetKey(SHInputManager::SH_KEYCODE::Q))
|
||||
{
|
||||
system->editorCamera.position += UP * dt * camera.movementSpeed;
|
||||
system->editorCamera.dirtyView = true;
|
||||
camera.position += UP * dt * camera.movementSpeed;
|
||||
camera.dirtyView = true;
|
||||
}
|
||||
if (SHInputManager::GetKey(SHInputManager::SH_KEYCODE::E))
|
||||
{
|
||||
system->editorCamera.position -= UP * dt * camera.movementSpeed;
|
||||
system->editorCamera.dirtyView = true;
|
||||
camera.position -= UP * dt * camera.movementSpeed;
|
||||
camera.dirtyView = true;
|
||||
}
|
||||
if (SHInputManager::GetKey(SHInputManager::SH_KEYCODE::RMB))
|
||||
{
|
||||
|
@ -53,9 +53,9 @@ namespace SHADE
|
|||
|
||||
//std::cout << camera.yaw << std::endl;
|
||||
|
||||
system->editorCamera.pitch -= mouseY * dt * camera.turnSpeed.x;
|
||||
system->editorCamera.yaw -= mouseX * dt * camera.turnSpeed.y;
|
||||
system->editorCamera.dirtyView = true;
|
||||
camera.pitch -= mouseY * dt * camera.turnSpeed.x;
|
||||
camera.yaw -= mouseX * dt * camera.turnSpeed.y;
|
||||
camera.dirtyView = true;
|
||||
}
|
||||
|
||||
system->UpdateCameraComponent(system->editorCamera);
|
||||
|
|
Loading…
Reference in New Issue