Merge pull request #6434 from AndrewMeadows/another-reset

fix avatar reset
This commit is contained in:
Philip Rosedale 2015-11-19 13:37:06 -08:00
commit f1b5589813
2 changed files with 2 additions and 1 deletions

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);
}
}

View file

@ -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
}