magicleap-controls

NOTE: This version of the documentation tracks unstable development happening on A-Frame’s master branch. If you wish to try it out, grab the unstable build. Otherwise, head to the documentation for the current 1.2.0 version

The magicleap-controls component interfaces with the Magic Leap controller. It wraps the tracked-controls component while adding button mappings, events, and Magic Leap controller model/

Example

<!-- Match Magic Leap controller if present, regardless of hand. -->
<a-entity magicleap-controls></a-entity>

<!-- Match Magic Leap controller if present and for specified hand. -->
<a-entity magicleap-controls="hand: left"></a-entity>
<a-entity magicleap-controls="hand: right"></a-entity>

Value

Property Description Default
hand The hand that will be tracked (e.g., right, left).
model Whether the Magic Leap controller model is loaded. true
orientationOffset Offset to apply to model orientation. x: 0, y: 0, z: 0

Events

Event Name Description
touchpadchanged Touchpad changed.
touchpaddown Touchpad pressed.
touchpadmoved Touchpad axis changed.
touchpadup Touchpad released.
touchpadtouchstart Touchpad touched.
touchpadtouchend Touchpad not touched.
gripchanged Grip changed.
gripdown Grip pressed.
gripup Grip released.
triggerchanged Trigger changed.
triggerdown Trigger pressed.
triggerup Trigger released.
menuchanged Menu changed.
menudown Menu pressed.
menuup Menu released.

Assets