Add up and down movement to first person camera (r/f keys)
This commit is contained in:
parent
a400ac3ed8
commit
7a8eaed6ed
@ -206,6 +206,28 @@ void InputManager::handleStaticAction(int key, int value)
|
|||||||
cam->setLinearVelocity(vel);
|
cam->setLinearVelocity(vel);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case KEY_KEY_R:
|
||||||
|
{
|
||||||
|
if (!world || !UserConfigParams::m_artist_debug_mode ||
|
||||||
|
UserConfigParams::m_camera_debug != 3) break;
|
||||||
|
|
||||||
|
Camera *cam = Camera::getActiveCamera();
|
||||||
|
core::vector3df vel(cam->getLinearVelocity());
|
||||||
|
vel.Y = value ? cam->getMaximumVelocity() : 0;
|
||||||
|
cam->setLinearVelocity(vel);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case KEY_KEY_F:
|
||||||
|
{
|
||||||
|
if (!world || !UserConfigParams::m_artist_debug_mode ||
|
||||||
|
UserConfigParams::m_camera_debug != 3) break;
|
||||||
|
|
||||||
|
Camera *cam = Camera::getActiveCamera();
|
||||||
|
core::vector3df vel(cam->getLinearVelocity());
|
||||||
|
vel.Y = value ? -cam->getMaximumVelocity() : 0;
|
||||||
|
cam->setLinearVelocity(vel);
|
||||||
|
break;
|
||||||
|
}
|
||||||
// Rotating the first person camera
|
// Rotating the first person camera
|
||||||
case KEY_KEY_Q:
|
case KEY_KEY_Q:
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user