Skip to content

Commit

Permalink
Reset rotation of first person camera when activating
Browse files Browse the repository at this point in the history
  • Loading branch information
Flakebi committed Mar 24, 2015
1 parent 7a8eaed commit 060bf2a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils/debug.cpp
Expand Up @@ -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)
{
Expand Down

0 comments on commit 060bf2a

Please sign in to comment.