mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 13:03:55 +02:00
Fix hand laser alignment
This commit is contained in:
parent
511eb34e5f
commit
d34ac2cea8
1 changed files with 2 additions and 1 deletions
|
@ -295,9 +295,10 @@ void HmdDisplayPlugin::updateFrameData() {
|
|||
}
|
||||
|
||||
_presentHandLaserPoints[i].first = vec3(_presentHandPoses[i][3]);
|
||||
_presentHandLaserPoints[i].second = _presentHandLaserPoints[i].first + (castDirection * distance);
|
||||
|
||||
vec3 intersectionPosition = vec3(_presentHandPoses[i][3]) + (castDirection * distance) - _presentUiModelTransform.getTranslation();
|
||||
intersectionPosition = glm::inverse(_presentUiModelTransform.getRotation()) * intersectionPosition;
|
||||
_presentHandLaserPoints[i].second = intersectionPosition;
|
||||
|
||||
// Take the interesection normal and convert it to a texture coordinate
|
||||
vec2 yawPitch;
|
||||
|
|
Loading…
Reference in a new issue