From 3a8de5ab0d15acb1eb9859df39c0c67a5ed8d9f4 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Thu, 18 Aug 2016 15:58:12 -0700 Subject: [PATCH] fix rotation function --- .../toggleAdvancedMovementForHandControllers.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/system/controllers/toggleAdvancedMovementForHandControllers.js b/scripts/system/controllers/toggleAdvancedMovementForHandControllers.js index 696cac714a..f5fdc6301a 100644 --- a/scripts/system/controllers/toggleAdvancedMovementForHandControllers.js +++ b/scripts/system/controllers/toggleAdvancedMovementForHandControllers.js @@ -35,7 +35,12 @@ function addAdvancedMovementItemToSettingsMenu() { } function rotate180() { - MyAvatar.orientation = Quat.inverse(MyAvatar.orientation); + var newOrientation = Quat.multiply(MyAvatar.orientation, Quat.angleAxis(180, { + x: 0, + y: 1, + z: 0 + })) + MyAvatar.orientation = newOrientation } var inFlipTurn = false;