getControllerGrip method
Returns a group representing the grip
space of the XR controller.
Use this space for visualizing 3D objects that support the user in pointing
tasks like UI interaction.
Note: If you want to show something in the user's hand AND offer a
pointing ray at the same time, you'll want to attached the handheld object
to the group returned by getControllerGrip()
and the ray to the
group returned by getController()
. The idea is to have two
different groups in two different coordinate spaces for the same WebXR
controller.
@param {number} index - The index of the controller.
@return {Group} A group representing the grip
space.
/
Implementation
WebXRController? getControllerGrip(int index ) {
WebXRController? controller = _getController( index );
return controller?.getGripSpace();
}