mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 20:58:38 +02:00
fix action events for gamepad;
This commit is contained in:
parent
69f7a89003
commit
88a576f846
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