use glm::quat_cast instead of extractRotation()

This commit is contained in:
U-GAPOS\andrew 2015-11-19 10:42:53 -08:00
parent 90ee205a66
commit b7f501c0b3

View file

@ -428,7 +428,7 @@ void MyAvatar::updateHMDFollowVelocity() {
}
if (_followSpeed > 0.0f) {
// 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);
}
}