diff --git a/interface/src/scripting/JoystickScriptingInterface.cpp b/interface/src/scripting/JoystickScriptingInterface.cpp index 039dc40961..cbc4fee81c 100644 --- a/interface/src/scripting/JoystickScriptingInterface.cpp +++ b/interface/src/scripting/JoystickScriptingInterface.cpp @@ -132,8 +132,10 @@ void JoystickScriptingInterface::update() { : HFActionEvent::endType(); // global action events fire in the center of the screen - HFActionEvent actionEvent(actionType, - Application::getInstance()->getCamera()->computeViewPickRay(0.5f, 0.5f)); + Application* app = Application::getInstance(); + PickRay pickRay = app->getCamera()->computeViewPickRay(app->getTrueMouseX(), + app->getTrueMouseY()); + HFActionEvent actionEvent(actionType, pickRay); qApp->sendEvent(qApp, &actionEvent); }