mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 09:57:26 +02:00
attempt to fix ray picking in standing mode
This commit is contained in:
parent
d16e00c17b
commit
42e7c5278c
1 changed files with 7 additions and 2 deletions
|
@ -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