From 6d82410bc5f44d7804441bd17db6aaa01bcbc150 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Mon, 5 Dec 2016 10:53:20 -0800 Subject: [PATCH] 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. --- interface/src/avatar/MyAvatar.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 730a6d4a85..49a4f0f5da 100755 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -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..