mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 04:07:11 +02:00
Merge pull request #6434 from AndrewMeadows/another-reset
fix avatar reset
This commit is contained in:
commit
f1b5589813
2 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ glm::mat4 OculusBaseDisplayPlugin::getProjection(Eye eye, const glm::mat4& baseP
|
|||
void OculusBaseDisplayPlugin::resetSensors() {
|
||||
#if (OVR_MAJOR_VERSION >= 6)
|
||||
ovr_RecenterPose(_hmd);
|
||||
preRender();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue