Log inGet started
Package

xr_edit.module

Newest version

This package holds more than this page lists. See all of its files in its world.

README.md

xr_edit

Selecting and moving things with the pointing hand in a headset.

GestureResult
Click the trigger on an objectselects it (the viewport's hierarchical click)
Hold the trigger on an objectpicks 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 handlethe gizmo's own drag, along the laser
Squeeze the grip with the laser on an objectthe 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.