View on GitHub

UISpatialSelectors

A Unity tool that allows you use hand tracking to interact with world UI elements.

UISpatialSelectors

This tool is intended for Magic Leap developers who want to to interact with world canvas UI elements using their hands and the controller as input.

76205271-465fd980-61d0-11ea-96c1-66f1ffba4968

Drag and drop the selector prefabs you want to use into your scene (I have one for a controller raycast and one that uses hand tracking key points).

Inside your world UI canvas, drag and drop SpatialSelectable prefabs (or add a UISpatialSelectable component to an element) like you would regular Unity buttons. These components have OnClick, OnHoverBegin and OnHoverEnd events that you can hook into. UISpatialSelectable extends Unity’s Selectable class so it will behave very similar to Unity’s buttons and will play nice with their built in event system.

spatialselectorguide