Builtin Library
README.md
xr_edit
Selecting and moving things with the pointing hand in a headset.
| Gesture | Result |
|---|---|
| Click the trigger on an object | selects it (the viewport's hierarchical click) |
| Hold the trigger on an object | picks it up: it follows the point the laser lands on in the world and is set down where the trigger is released |
| Trigger on a gizmo handle | the gizmo's own drag, along the laser |
| Squeeze the grip with the laser on an object | the object follows the hand in position and rotation until the grip is released |
| A (pointing hand) | steps the gizmo's tool: move, rotate, scale |
| B (pointing hand) | undo |
| B (other hand) | redo |
Each move is one undo operation of the gizmo (gizmo.beginFree, gizmo.beginGrab), so undo, redo
and live sync behave as they do for a gizmo drag on a desktop. Call xr_edit.tick(dt) once per
editor frame, ahead of gizmo.tick.
A bare hand has the pinch for both: a pinch that begins with the laser on an object (and not on a gizmo handle) is the grip, and carries the object with the hand until the pinch opens; a pinch on anything else is the trigger.