From 88a576f84635e30c18087e4d569eaf25f8857e36 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Tue, 9 Dec 2014 19:35:38 -0800 Subject: [PATCH] fix action events for gamepad; --- interface/src/scripting/JoystickScriptingInterface.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); }