Skip to main content
Version: 20 Mar 2024

Controller Overview

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 section includes general information on Controller input and Controller Example scripts, including:

  • 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 MagicLeapInputs.ControllerActions.
  • 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.