Hi, I’m having an issue with Press interactions when using XR Controller Triggers. The following is my setup:
I only started using the new input system yesterday, but under my understanding the above should fire the performed event on Dummy each time the trigger is pressed past the 0.5 threshold. When I replace the XR trigger with the Gamepad left trigger, it works as expected.
When it is the XR trigger, however, it does not correctly work at all. Instead, it simply fires a single event on startup and never again. Removing the press interaction allows for the performed event to correctly fire, making me assume this is specific to the XR controller input, or an oversight on my part.
Below is the script I am using to test.
using UnityEngine;
using UnityEngine.Experimental.Input;
public class InputFun : MonoBehaviour
{
private InputActions controls;
public void Awake()
{
InputSystem.settings.updateMode = InputSettings.UpdateMode.ProcessEventsInDynamicUpdateOnly;
controls = new InputActions();
controls.Giant.Dummy.performed += ctx => Debug.Log(ctx.ReadValue<float>().ToString() + "-----" + Time.time);
}
private void OnEnable()
{
controls.Enable();
}
private void OnDisable()
{
controls.Disable();
}
}
I’ve enclosed my dummy project that I am using to test this. I am using an Oculus Rift with touch controllers in Unity 2019.1.2f1. Please let me know if any other information would be helpful.
As an aside, the new input system is absolutely fantastic overall, and is a monumental leap over the old one. Great job to everyone who worked on it