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?
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)
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();