Keyboard camera controls.

Comma: Pan Left
Period: Pan Right
I: Zoom in
O: Zoom out
This commit is contained in:
scottbeebiwan
2018-07-05 18:06:27 -07:00
parent 5c90258546
commit 2a2d6a777b

View File

@@ -890,15 +890,24 @@ void Demo::onUserInput(UserInput* ui) {
Sleep(10); Sleep(10);
} }
} }
// Camera KB Handling {
if (GetKPBool(VK_OEM_COMMA)) //Left
usableApp->cameraController.panLeft();
else if (GetKPBool(VK_OEM_PERIOD)) // Right
usableApp->cameraController.panRight();
else if (GetKPBool(0x49)) // Zoom In (I)
usableApp->cameraController.Zoom(1);
else if (GetKPBool(0x4F)) // Zoom Out (O)
usableApp->cameraController.Zoom(-1);
// }
//readMouseGUIInput(); //readMouseGUIInput();
// Add other key handling here // Add other key handling here
} }
bool GetKPBool(int VK) {
return (GetKeyState(VK) & 0x8000);
}
void makeFlag(Vector3 &vec, RenderDevice* &rd) void makeFlag(Vector3 &vec, RenderDevice* &rd)
{ {