mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 10:47:11 +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();
|
: HFActionEvent::endType();
|
||||||
|
|
||||||
// global action events fire in the center of the screen
|
// global action events fire in the center of the screen
|
||||||
HFActionEvent actionEvent(actionType,
|
Application* app = Application::getInstance();
|
||||||
Application::getInstance()->getCamera()->computeViewPickRay(0.5f, 0.5f));
|
PickRay pickRay = app->getCamera()->computeViewPickRay(app->getTrueMouseX(),
|
||||||
|
app->getTrueMouseY());
|
||||||
|
HFActionEvent actionEvent(actionType, pickRay);
|
||||||
qApp->sendEvent(qApp, &actionEvent);
|
qApp->sendEvent(qApp, &actionEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue