mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 06:22:10 +02:00
use glm::quat_cast instead of extractRotation()
This commit is contained in:
parent
90ee205a66
commit
b7f501c0b3
1 changed files with 1 additions and 1 deletions
|
@ -428,7 +428,7 @@ void MyAvatar::updateHMDFollowVelocity() {
|
||||||
}
|
}
|
||||||
if (_followSpeed > 0.0f) {
|
if (_followSpeed > 0.0f) {
|
||||||
// to compute new velocity we must rotate offset into the world-frame
|
// to compute new velocity we must rotate offset into the world-frame
|
||||||
glm::quat sensorToWorldRotation = extractRotation(_sensorToWorldMatrix);
|
glm::quat sensorToWorldRotation = glm::normalize(glm::quat_cast(_sensorToWorldMatrix));
|
||||||
_followVelocity = _followSpeed * glm::normalize(sensorToWorldRotation * offset);
|
_followVelocity = _followSpeed * glm::normalize(sensorToWorldRotation * offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue