From 431daecd8ed5528cfb6db45ae6d1d9e5f913137b Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 19 Sep 2018 13:38:53 -0700 Subject: [PATCH] Fix shifting of yaw rotation handle --- interface/src/ui/overlays/Circle3DOverlay.cpp | 1 - scripts/system/libraries/entitySelectionTool.js | 14 ++++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/interface/src/ui/overlays/Circle3DOverlay.cpp b/interface/src/ui/overlays/Circle3DOverlay.cpp index 0d62601089..1d418d966e 100644 --- a/interface/src/ui/overlays/Circle3DOverlay.cpp +++ b/interface/src/ui/overlays/Circle3DOverlay.cpp @@ -74,7 +74,6 @@ void Circle3DOverlay::render(RenderArgs* args) { const float FULL_CIRCLE = 360.0f; const float SLICES = 180.0f; // The amount of segment to create the circle - const float SLICE_ANGLE = FULL_CIRCLE / SLICES; const float SLICE_ANGLE_RADIANS = glm::radians(FULL_CIRCLE / SLICES); const float MAX_COLOR = 255.0f; diff --git a/scripts/system/libraries/entitySelectionTool.js b/scripts/system/libraries/entitySelectionTool.js index 5bca58b1ac..930f33f8d9 100644 --- a/scripts/system/libraries/entitySelectionTool.js +++ b/scripts/system/libraries/entitySelectionTool.js @@ -2622,6 +2622,10 @@ SelectionDisplay = (function() { updateSelectionsRotation(rotationChange, rotationCenter); updateRotationDegreesOverlay(-angleFromZero, rotationDegreesPosition); + if (direction === ROTATE_DIRECTION.YAW) { + angleFromZero *= -1; + } + var startAtCurrent = 0; var endAtCurrent = angleFromZero; var maxDegrees = 360; @@ -2635,16 +2639,6 @@ SelectionDisplay = (function() { }); // not sure why but this seems to be needed to fix an reverse rotation for yaw ring only - if (direction === ROTATE_DIRECTION.YAW) { - if (spaceMode === SPACE_LOCAL) { - Overlays.editOverlay(handleRotateCurrentRing, { rotation: worldRotationZ }); - } else { - var rotationDegrees = 90; - Overlays.editOverlay(handleRotateCurrentRing, { - rotation: Quat.fromPitchYawRollDegrees(-rotationDegrees, 0, 0) - }); - } - } } if (wantDebug) {