Skip to content

Add snap option to gizmos (Ctrl/Cmd+drag)#993

Closed
ToRainu256 wants to merge 1 commit into
MrNeRF:masterfrom
ToRainu256:feature/gizmo-snap
Closed

Add snap option to gizmos (Ctrl/Cmd+drag)#993
ToRainu256 wants to merge 1 commit into
MrNeRF:masterfrom
ToRainu256:feature/gizmo-snap

Conversation

@ToRainu256
Copy link
Copy Markdown
Contributor

@ToRainu256 ToRainu256 commented Mar 16, 2026

Summary

  • Add grid snapping to gizmo operations when holding Ctrl during drag
  • Rotation snaps to 5° increments, translation to 0.1 units, scale to 0.1 ratio
  • Without Ctrl, gizmo behavior is unchanged

Details

Introduces a computeSnapPtr() helper that returns snap values based on the active gizmo operation
when Ctrl is held, or nullptr otherwise. Applied to all three ImGuizmo::Manipulate call sites in
GizmoManager (node gizmo, standard gizmo, and the third gizmo path).

Closes #746

Rotate snaps to 5° increments, translate to 0.1 units, scale to 0.1
ratio when holding Ctrl (Cmd on macOS). Applies to node, cropbox, and
ellipsoid gizmos.

Closes MrNeRF#746
@ToRainu256 ToRainu256 closed this Mar 16, 2026
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.

Rotation gizmo - add option to snap to nearest full degree when rotating

1 participant