mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 09:33:36 +02:00
Merge pull request #3939 from Atlante45/mouse_pick_in_oculus
fix action events for gamepad;
This commit is contained in:
commit
edb79ccbd9
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue