Repository navigation
[Patch] Wire gizmo rotate mode into the ray-based drag pipeline - #1436
Merged
Merged
Conversation
beginGizmoDrag/updateGizmoDrag discarded .rotate handles immediately, so the documented generic drag lifecycle never actually turned an entity. Rotate now derives its angle from a ray/rotation-plane intersection and feeds it through the existing snapping accumulator and applyGizmoRotation, matching translate/scale. Fixes #1435
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1435.
beginGizmoDrag/updateGizmoDragdiscarded.rotatehandles immediately after starting a rotation accumulator, so the documented generic drag lifecycle (beginGizmoDrag→queueGizmoDragUpdate→applyPendingGizmoDragUpdate→endGizmoDrag) never actually turned an entity for rotate — only translate/scale worked.beginGizmoDrag/updateGizmoDragnow intersect the drag ray with the rotation handle's plane each frame, measure the signed angle swept since the drag began, feed the per-frame increment through the existingsnappedGizmoRotationDeltaaccumulator, and apply it via the existingapplyGizmoRotation— the same call used by the Editor's separate mouse-angle rotation path, left untouched.InteractionGameplayDemonow cycles translate → rotate → scale with Tab, so rotate mode is actually reachable from the demo (previously it only ever created.translate).docs/API/UsingGizmoSystem.mdupdated to note rotate uses the same ray-based lifecycle, no special calling convention.Test plan
swift test --filter UntoldEngineTests— 1836 tests, 0 failures, including new regression testtest_axisGizmoDrag_rotatesFromCurrentRayConstraintInteractionGameplayDemo: select entity, Tab to rotate gizmo, drag a ring — entity rotates