History

fix action events for gamepad;

Atlante45 committed 11 years ago

Commit 88a576f1 parent 69f7a891 file · +4 −2Browse files

Showing the changes to interface/src/scripting/JoystickScriptingInterface.cpp (1 of 1 file). Show all

Unified · Split

interface/src/scripting/JoystickScriptingInterface.cpp+4−2
@@ -132,8 +132,10 @@ void JoystickScriptingInterface::update() { · 131 unmodified lines
132132 : HFActionEvent::endType();
133133
134134 // global action events fire in the center of the screen
135− HFActionEvent actionEvent(actionType,
136− Application::getInstance()->getCamera()->computeViewPickRay(0.5f, 0.5f));
135+ Application* app = Application::getInstance();
136+ PickRay pickRay = app->getCamera()->computeViewPickRay(app->getTrueMouseX(),
137+ app->getTrueMouseY());
138+ HFActionEvent actionEvent(actionType, pickRay);
137139 qApp->sendEvent(qApp, &actionEvent);
138140 }
139141