How to implement the Control Pointer of Magic Leap 1: Magic Leap Developer Toolkit on Magic Leap 2

Unity Editor version: 2022.2.0f1
ML2 OS version:1.2.0-dev2
MLSDK version:1.2.0-dev2
Host OS: (Windows/MacOS) Windows 11

I want to be able to move and rotate 3D objects with the Magic Leap 2 controller. I also want to be able to capture UI click events with the trigger of the Magic Leap 2 controller. In Magic Leap 1, there was the MLTK Control Pointer, and I want to implement this on Magic Leap 2.

By the way, the MRTK for Magic Leap 2 provides controller functionality, but I don't think rotating a 3D model was possible in the demo. I am exploring ways to build these functionalities in Magic Leap 2. Please let me know what the best approach is.

Sadao Tokuyama

Hi @tokufxug, thank you for your question. With ML2, we use Unity's XR Interaction Toolkit. You can download the samples directly from the package. For a great overview, check out this video: Unlock the Power of Unity with the NEW Interaction Toolkit 2.3.0 ! - YouTube

1 Like

Hi Kevin,
Thanks for the reply.

You can download the samples directly from the package.

Where do I download this from? It would be helpful if you could be explicit about the URL or location.

I watched the YouTube video and it is about HandTracking and EyeTracking.

I don't see in this video that it is a way to collide a 3D object such as a Cube with the Controller's Ray and move the 3D object while the trigger is pressed.

Where in this video should I refer to implement the MLTK Control Pointern feature I shared?

@tokufxug You can find the link to the XRI package here: Samples | XR Interaction Toolkit | 2.3.2
To install it:

  1. Open the Unity Package Manager
  2. Click on the + icon and from the drop down select package name
  3. Enter com.unity.xr.interaction.toolkit@2.3.2

Here is the link to the Github Example Project

We currently don't have plans to update MLTK to support Magic Leap 2.