The Magic Leap 2's controller input can be accessed using Unity's Input System. The Magic Leap 2 SDK includes predefined action mappings, so developers can access controller input in a familiar way.
This feature requires the
CONTROLLER_POSE permission to be enabled in your project's Manifest Settings. (Edit > Project Settings > Magic Leap > Manifest Settings)
This category includes the following articles:
- API Overview - a summary of how to get started using the Magic Leap 2 Controller Input API.
- Reading Controller Input - demonstrates how to read the Magic Leap 2 Controller input values directly from the
- Controller Action Events - includes an example and information on subscribing to delegates that are called with the controller's input values changes.
- Tracked Pose Driver - A guide on setting up Unity's Tracked Pose Driver to mirror the controllers position and rotation.
- Migration Guide - Includes details on upgrading your Magic Leap 1 controller API to the Magic Leap 2.
To learn about the Magic Leap 2's controller hardware features, see the Controller Features guide.
📄️ API Overview
Controller API Overview
📄️ Controller Input Events
This section demonstrates how to use Unity's Input System to access and receive the input events that are triggered whenever an action is performed on the Magic Leap 2's controller.
📄️ Controller Gesture Events
This section demonstrates how to use Magic Leap's Gesture subsystem to receive the input events that are triggered when the user performs a gesture on the controllers touch pad.
📄️ Controller Input Values
Using Unity Input System, you can read Magic Leap 2's controller input directly using the InputAction.ReadValue() method. View Unity's Documentation to learn more about Unity Input System Unity's Input System.
📄️ Controller Tracked Pose Driver
Unity Input System - Tracked Pose Driver
📄️ Migrating from ML1
Upgrade to Magic Leap's new Controller APIs