Merge pull request #3939 from Atlante45/mouse_pick_in_oculus

fix action events for gamepad;
This commit is contained in:
Brad Hefta-Gaub 2014-12-09 19:47:33 -08:00
commit edb79ccbd9

View file

@ -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);
}