Interface XrPointerOptions
cursorColor?: [number, number, number];
cursorPickedColor?: [number, number, number];
cursorSize?: number;
disableSwitchOnClick?: boolean;
enableOnAllControllers?: boolean;
laserColor?: [number, number, number];
laserPickedColor?: [number, number, number];
laserThickness?: number;
maxLength?: number;
onHoverEnd?: (mesh: Mesh, input: XrInputSource) => void;
onHoverStart?: (mesh: Mesh, input: XrInputSource) => void;
onSelect?: (mesh: Mesh, info: PickingInfo, input: XrInputSource) => void;
predicate?: (mesh: Mesh) => boolean;
preferredHandedness?: XrHandedness;
}
Properties
Optionalcursor Color
Cursor (selection ring) emissive colour [r,g,b] (0–1) while not pointing at a
mesh. Default [0.8, 0.8, 0.8] (Babylon.js selectionMeshDefaultColor).
Optionalcursor Picked Color
Cursor (selection ring) emissive colour [r,g,b] (0–1) while pointing at a mesh.
Default blue [0.3, 0.3, 1] (Babylon.js selectionMeshPickedColor).
Optionalcursor Size
Selection-ring base outer diameter in metres (scaled up with hit distance so it
keeps a roughly constant apparent size, like Babylon.js). Default 0.03.
Optionaldisable Switch On Click
Disable moving pointer focus to another controller when its trigger is pressed
(single-active mode only). Default false.
Optionalenable On All Controllers
Draw a laser + cursor on every tracked controller at once. When false (default,
matching Babylon.js), only a single active controller shows a pointer; pressing
the trigger on another controller moves focus to it (see disableSwitchOnClick).
Babylon calls this enablePointerSelectionOnAllControllers.
Optionallaser Color
Laser emissive colour [r,g,b] (0–1) while not pointing at a mesh. Default
light grey [0.7, 0.7, 0.7] (Babylon.js laserPointerDefaultColor).
Optionallaser Picked Color
Laser emissive colour [r,g,b] (0–1) while pointing at a mesh. Default
[0.9, 0.9, 0.9] (Babylon.js laserPointerPickedColor).
Optionallaser Thickness
Laser cross-section thickness in metres. Default 0.004.
Optionalmax Length
Maximum beam length in metres when nothing is hit. Default 10.
Optionalon Hover End
Fired when a source's ray stops hovering a mesh.
Optionalon Hover Start
Fired when a source's ray starts hovering a mesh.
Optionalon Select
Fired when the trigger (select) is pressed while hovering a mesh.
Optionalpredicate
Restrict which meshes the ray can pick (in addition to mesh.pickable).
Optionalpreferred Handedness
Which hand's controller should own the pointer initially / be preferred when picking
the active controller (single-active mode only). Default "none" → first tracked.
Options for createXrPointer.