Fix for away.js teleporting user when in desktop mode

away.js calls MyAvatar.centerBody, however centerBody is only meaningful in HMD mode.
To guard against this, MyAvatar::centerBody is now a no-op if the application is not in HMD mode.
This commit is contained in:
Anthony J. Thibault 2016-12-05 10:53:20 -08:00
parent 349f0355ae
commit 6d82410bc5

View file

@ -254,6 +254,10 @@ void MyAvatar::centerBody() {
return;
}
if (!qApp->isHMDMode()) {
return;
}
// derive the desired body orientation from the current hmd orientation, before the sensor reset.
auto newBodySensorMatrix = deriveBodyFromHMDSensor(); // Based on current cached HMD position/rotation..