How To Use
Setting Up
Drag and drop LeftHand and RightHand prefabs in the scene.
Reference XRRig to InputRoot of MultiSourceInputDataProvider for each hand.
Make sure that there are no input modules or event systems in the scene.
Drag and drop UIPointer prefab in the scene.
Adjusting UIPointer
Reference corresponding dependencies to each concrete pointer implementation (right input provider and right palm if you want the pointer to be for right hand)


Style your ray using RayVisuals.

Testing
Use pinch gestures to operate UI elements


NEED TO KNOW
UIPointer uses GraphicRaycaster to manipulate the canvas which means that canvas needs graphic elements. This can lead to unwanted behavior when no graphical elements are found on canvas. Make sure that every canvas has an Image that covers whole width and height of the canvas. You can make that picture transparent. Then your UIPointer will recognize the whole canvas.
Never rotate your UI elements by 180 degrees around Y axis, rather scale your element to negative value on X axis. That is because Z axis needs to point away from canvas!
UIPointer component needs at least one concrete pointer to work (Hand, controller or your custom one).
Last updated