Hi,
I am trying to just detect a single input from the controller but I can't do it.
I am using the code shown below but nothing happens.
Unity v 2019.4.38f1
Pico XR Unity SDK 2.0.4
using UnityEngine;
using UnityEngine.XR;
public class controllerInput : MonoBehaviour
{
private bool ltriggerValue;
// Update is called once per frame
void Update()
{
if (InputDevices.GetDeviceAtXRNode(XRNode.LeftHand).TryGetFeatureValue(CommonUsages.triggerButton, out ltriggerValue) && ltriggerValue)
{
Debug.Log("Trigger button is pressed");
}
}
}
When I open the XR Input debugger (Unity Editor-->Window-->Analysis-->XR Input Debugger) it detects the Pico Left- and Right-Hand controllers and the Pico HMD but when I press any button it doesn't register anything.
Any ideas?