Browse Source

input: do not let the joystick override the keyboard.

legacy
Sam Hocevar sam 12 years ago
parent
commit
45bab95127
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/camera.cpp

+ 2
- 2
src/camera.cpp View File

@@ -71,8 +71,8 @@ void Camera::TickGame(float seconds)
stick = Input::TrackStick();
if (stick && stick->GetAxisCount() >= 2)
{
rightleft = 2.f * stick->GetAxis(0) * std::abs(stick->GetAxis(0));
updown = -2.f * stick->GetAxis(1) * std::abs(stick->GetAxis(1));
rightleft += 2.f * stick->GetAxis(0) * std::abs(stick->GetAxis(0));
updown += -2.f * stick->GetAxis(1) * std::abs(stick->GetAxis(1));
}

m_position += vec3(rightleft, pgupdown, -updown) * 200.f * seconds;


Loading…
Cancel
Save