Showing the changes to interface/src/scripting/JoystickScriptingInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -132,8 +132,10 @@ void JoystickScriptingInterface::update() { · 131 unmodified lines | |||
| 132 | : HFActionEvent::endType(); | 132 | : HFActionEvent::endType(); |
| 133 | 133 | ||
| 134 | // global action events fire in the center of the screen | 134 | // global action events fire in the center of the screen |
| 135 | HFActionEvent actionEvent(actionType, | 135 | Application* app = Application::getInstance(); |
| 136 | Application::getInstance()->getCamera()->computeViewPickRay(0.5f, 0.5f)); | 136 | PickRay pickRay = app->getCamera()->computeViewPickRay(app->getTrueMouseX(), |
| 137 | app->getTrueMouseY()); | ||
| 138 | HFActionEvent actionEvent(actionType, pickRay); | ||
| 137 | qApp->sendEvent(qApp, &actionEvent); | 139 | qApp->sendEvent(qApp, &actionEvent); |
| 138 | } | 140 | } |
| 139 | 141 | ||