MyAvatar: reset fix, for both oculus and vive

This commit is contained in:
Anthony J. Thibault 2016-05-23 16:34:19 -07:00
parent f82c3ba4f2
commit edfce0d5ba

View file

@ -263,8 +263,9 @@ void MyAvatar::reset(bool andRecenter, bool andReload) {
setPosition(worldBodyPos); setPosition(worldBodyPos);
setOrientation(worldBodyRot); setOrientation(worldBodyRot);
// now sample the new hmd orientation AFTER sensor reset. // now sample the new hmd orientation AFTER sensor reset, which should be identity.
updateFromHMDSensorMatrix(qApp->getHMDSensorPose()); glm::mat4 identity;
updateFromHMDSensorMatrix(identity);
// update the body in sensor space using the new hmd sensor sample // update the body in sensor space using the new hmd sensor sample
_bodySensorMatrix = deriveBodyFromHMDSensor(); _bodySensorMatrix = deriveBodyFromHMDSensor();