mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
Fix shifting of yaw rotation handle
This commit is contained in:
parent
788c883c02
commit
431daecd8e
2 changed files with 4 additions and 11 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue