Showing the changes to interface/src/Application.cpp (1 of 144 files). Show all
Unified · Split
| @@ -2834,14 +2834,8 @@ void Application::update(float deltaTime) { · 2833 unmodified lines | ||
| 2834 | 2834 | myAvatar->setDriveKeys(TRANSLATE_Y, userInputMapper->getActionState(controller::Action::TRANSLATE_Y)); |
| 2835 | 2835 | myAvatar->setDriveKeys(TRANSLATE_X, userInputMapper->getActionState(controller::Action::TRANSLATE_X)); |
| 2836 | 2836 | if (deltaTime > FLT_EPSILON) { |
| 2837 | − // For rotations what we really want are meausures of "angles per second" (in order to prevent | |
| 2838 | − // fps-dependent spin rates) so we need to scale the units of the controller contribution. | |
| 2839 | − // (TODO?: maybe we should similarly scale ALL action state info, or change the expected behavior | |
| 2840 | − // controllers to provide a delta_per_second value rather than a raw delta.) | |
| 2841 | − const float EXPECTED_FRAME_RATE = 60.0f; | |
| 2842 | − float timeFactor = EXPECTED_FRAME_RATE * deltaTime; | |
| 2843 | − myAvatar->setDriveKeys(PITCH, -1.0f * userInputMapper->getActionState(controller::Action::PITCH) / timeFactor); | |
| 2844 | − myAvatar->setDriveKeys(YAW, -1.0f * userInputMapper->getActionState(controller::Action::YAW) / timeFactor); | |
| 2837 | + myAvatar->setDriveKeys(PITCH, -1.0f * userInputMapper->getActionState(controller::Action::PITCH)); | |
| 2838 | + myAvatar->setDriveKeys(YAW, -1.0f * userInputMapper->getActionState(controller::Action::YAW)); | |
| 2845 | 2839 | myAvatar->setDriveKeys(STEP_YAW, -1.0f * userInputMapper->getActionState(controller::Action::STEP_YAW)); |
| 2846 | 2840 | } |
| 2847 | 2841 | } |