Using сlassic XRComponents

An issue has been identified regarding the interaction with the controller through classic XR components. Specifically, when invoking functions from "UnityEngine.XR.OpenXR.Input", such as "SendHapticImpulse()", the controller fails to initiate a response.

As such, it is imperative to establish a suitable framework for working with the controller using fundamental XR components. What strategies should be employed to facilitate optimal functioning of the controller in this context?

Hi @kirill_levchenko.

Currently the Unity Magic Leap SDK does not support open XR. However, our controller does support the generic Android Haptic Feedback API and the Haptic Feedback using the non OpenXR implementation.

However, for the best quality results, I recommend looking at our controller Example scene. The fastest implementation requires using a predefined haptic pattern like so (Recomended)

InputSubsystem.Extensions.Haptics.StartPreDefined(InputSubsystem.Extensions.Haptics.PreDefined.Type.A);

You can also create a custom haptic "buzz"

var buzz = InputSubsystem.Extensions.Haptics.Buzz.Create(200, 200, 4000, 20);
buzz.StartHaptics();

//or call static wrapper if u don't care about the object

InputSubsystem.Extensions.Haptics.StartBuzz(700, 200, 4000, 20);

You can also create a completely custom haptic pattern like so:

  var buzz1 = InputSubsystem.Extensions.Haptics.Buzz.Create(200, 800, 2000, 50);
        var preDefinedA = InputSubsystem.Extensions.Haptics.PreDefined.Create(InputSubsystem.Extensions.Haptics.PreDefined.Type.A);
        var preDefinedC = InputSubsystem.Extensions.Haptics.PreDefined.Create(InputSubsystem.Extensions.Haptics.PreDefined.Type.C);
        var buzz2 = InputSubsystem.Extensions.Haptics.Buzz.Create(800, 200, 2000, 20);

       // reference type to be cached
        var customHaptics= new InputSubsystem.Extensions.Haptics.CustomPattern();
        customHaptics.Add(in buzz1);
        customHaptics.Add(in preDefinedA, 500);
        customHaptics.Add(in preDefinedC, 500);
        customHaptics.Add(in buzz2); 
     
        customHatpics.StartHaptics();

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.