Skip to content

[Patch] Wire gizmo rotate mode into the ray-based drag pipeline - #1436

Merged
untoldengine merged 1 commit into
developfrom
issue/1435
Dec 3, 2026
Merged

untoldengine merged 1 commit into
developfrom
issue/1435

Conversation

@untoldengine

Copy link
Copy Markdown
Owner

Summary

Fixes #1435. beginGizmoDrag/updateGizmoDrag discarded .rotate handles 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/updateGizmoDrag now 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 existing snappedGizmoRotationDelta accumulator, and apply it via the existing applyGizmoRotation — the same call used by the Editor's separate mouse-angle rotation path, left untouched.
  • InteractionGameplayDemo now cycles translate → rotate → scale with Tab, so rotate mode is actually reachable from the demo (previously it only ever created .translate).
  • docs/API/UsingGizmoSystem.md updated 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 test test_axisGizmoDrag_rotatesFromCurrentRayConstraint
  • Manually verified in InteractionGameplayDemo: select entity, Tab to rotate gizmo, drag a ring — entity rotates

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
@untoldengine
untoldengine merged commit e0514a1 into develop Dec 3, 2026
3 of 4 checks passed
@untoldengine
untoldengine deleted the issue/1435 branch December 3, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gizmo rotate mode unreachable via documented drag pipeline (beginGizmoDrag/updateGizmoDrag)

1 participant