瀏覽代碼

input: do not let the joystick override the keyboard.

legacy
Sam Hocevar sam 12 年之前
父節點
當前提交
45bab95127
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      src/camera.cpp

+ 2
- 2
src/camera.cpp 查看文件

@@ -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…
取消
儲存