Fix shifting of yaw rotation handle

This commit is contained in:
Ryan Huffman 2018-09-19 13:38:53 -07:00
parent 788c883c02
commit 431daecd8e
2 changed files with 4 additions and 11 deletions

View file

@ -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;

View file

@ -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) {