mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 03:37:49 +02:00
Merge pull request #5459 from SamGondelman/sam/input-plugins
Plugins branch - small fixes
This commit is contained in:
commit
6364072c10
2 changed files with 10 additions and 2 deletions
|
@ -1531,6 +1531,9 @@ void Application::keyPressEvent(QKeyEvent* event) {
|
||||||
Menu::getInstance()->setIsOptionChecked(MenuOption::ThirdPerson, !Menu::getInstance()->isOptionChecked(MenuOption::FirstPerson));
|
Menu::getInstance()->setIsOptionChecked(MenuOption::ThirdPerson, !Menu::getInstance()->isOptionChecked(MenuOption::FirstPerson));
|
||||||
cameraMenuChanged();
|
cameraMenuChanged();
|
||||||
break;
|
break;
|
||||||
|
case Qt::Key_O:
|
||||||
|
_overlayConductor.setEnabled(!_overlayConductor.getEnabled());
|
||||||
|
break;
|
||||||
case Qt::Key_Slash:
|
case Qt::Key_Slash:
|
||||||
Menu::getInstance()->triggerOption(MenuOption::Stats);
|
Menu::getInstance()->triggerOption(MenuOption::Stats);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -365,8 +365,13 @@ void ApplicationCompositor::computeHmdPickRay(glm::vec2 cursorPos, glm::vec3& or
|
||||||
|
|
||||||
// We need the RAW camera orientation and position, because this is what the overlay is
|
// We need the RAW camera orientation and position, because this is what the overlay is
|
||||||
// rendered relative to
|
// rendered relative to
|
||||||
const glm::vec3 overlayPosition = qApp->getCamera()->getPosition();
|
glm::vec3 overlayPosition = qApp->getCamera()->getPosition();
|
||||||
const glm::quat overlayOrientation = qApp->getCamera()->getRotation();
|
glm::quat overlayOrientation = qApp->getCamera()->getRotation();
|
||||||
|
|
||||||
|
if (Menu::getInstance()->isOptionChecked(MenuOption::StandingHMDSensorMode)) {
|
||||||
|
overlayPosition = _modelTransform.getTranslation();
|
||||||
|
overlayOrientation = _modelTransform.getRotation();
|
||||||
|
}
|
||||||
|
|
||||||
// Intersection UI overlay space
|
// Intersection UI overlay space
|
||||||
glm::vec3 worldSpaceDirection = overlayOrientation * overlaySpaceDirection;
|
glm::vec3 worldSpaceDirection = overlayOrientation * overlaySpaceDirection;
|
||||||
|
|
Loading…
Reference in a new issue