mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-24 23:18:46 +02:00
Make mouse reticle be perpendicular to head.
This commit is contained in:
parent
a1844d8c19
commit
e4dbb5e61a
1 changed files with 1 additions and 1 deletions
|
@ -425,7 +425,7 @@ glm::mat4 CompositorHelper::getReticleTransform(const glm::mat4& eyePose, const
|
||||||
d = glm::normalize(overlaySurfacePoint);
|
d = glm::normalize(overlaySurfacePoint);
|
||||||
}
|
}
|
||||||
reticlePosition = headPosition + (d * getReticleDepth());
|
reticlePosition = headPosition + (d * getReticleDepth());
|
||||||
quat reticleOrientation = quat(vec3(-spherical.y, spherical.x, 0.0f));
|
quat reticleOrientation = glm::quat_cast(_currentDisplayPlugin->getHeadPose());
|
||||||
vec3 reticleScale = vec3(Cursor::Manager::instance().getScale() * reticleSize * getReticleDepth());
|
vec3 reticleScale = vec3(Cursor::Manager::instance().getScale() * reticleSize * getReticleDepth());
|
||||||
return glm::inverse(eyePose) * createMatFromScaleQuatAndPos(reticleScale, reticleOrientation, reticlePosition);
|
return glm::inverse(eyePose) * createMatFromScaleQuatAndPos(reticleScale, reticleOrientation, reticlePosition);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue