0 votes
by (120 points)

Hi all,

We are having some real issues with getting the Haptics to work on our current Pico Neo 3 Pro Eye headset and project.

I've noticed that in the documentation, it stated that Haptics are achieved throught the "SetControllerVibration" method, which is found via the PXR_Input class (this is also confirmed by this thread: ).

However, we have tried with both the Pico UnityXR SDK V2.0.4 and V2.0.5 packages and the PXR_Input class script is not found in the project anywhere. Therefore we cannot call the needed vibration method.

Is the documentation wrong?

Please could you advise asap.

Kindest regards,

Mike

1 Answer

0 votes
by (27.7k points)

Dear developer,

Please try using the following script named SetControllerVibrationTest to see if it works on your project. The SDK version we tested was Pico UnityXR SDK v2.0.5. And the SetControllerVibration function is effective on the device.

using System.Collections;
using System.Collections.Generic;
using Unity.XR.PXR;
using UnityEngine;
using UnityEngine.XR;

public class SetControllerVibrationTest : MonoBehaviour
{
    private bool TriggerButton;

    // Start is called before the first frame update
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {
        if (InputDevices.GetDeviceAtXRNode(XRNode.RightHand).TryGetFeatureValue(CommonUsages.triggerButton, out TriggerButton) && TriggerButton)
        {
            PXR_Input.SetControllerVibration(1, 10, PXR_Input.Controller.RightController);
        }
    }
}
...