Reset rotation of first person camera when activating

This commit is contained in:
Flakebi 2015-03-24 00:46:26 +01:00
parent 7a8eaed6ed
commit 060bf2a2cf

View File

@ -520,6 +520,10 @@ bool onEvent(const SEvent &event)
{
UserConfigParams::m_camera_debug = 3;
irr_driver->getDevice()->getCursorControl()->setVisible(false);
// Reset camera rotation
Camera *cam = Camera::getActiveCamera();
cam->setDirection(vector3df(0, 0, 1));
cam->setUpVector(vector3df(0, 1, 0));
}
else if (cmdID == DEBUG_GUI_CAM_NORMAL)
{