Input Threshold Questions
In the new input system, if you add a handle button, you only need to add Pressed, and you can get press, click, and lift by monitoring his three actions.
For example the following code:
inputAction.Player.Trigger_Right.started += OnRightTriggerStarted;
inputAction.Player.Trigger_Right.performed += OnRightTriggerPerformed;
inputAction.Player.Trigger_Right.canceled += OnRightTriggerCanceled;
But there is a problem here. The Grip button of QuestPro is easy to be accidentally touched. It is triggered by a slight touch. So how to set the trigger threshold? method can be implemented. If there is a better way, please let me know.
Solution
You can try to decompose the Action into 3 parts, and set the PressPoint separately for each one.
As shown in the picture: I use the Grip button here as an example:
I have selected the Axis
Started setting for both types:
the Performed setting:
the Canceled setting:
In the code, there is not much difference, but it is replaced with three different InputActions, and only used performed to trigger:
inputAction.Player.Grip_Right_Started.performed += OnRightGripStarted;
inputAction.Player.Grip_Right_Performed.performed += OnRightGripPerformed;
inputAction.Player.Grip_Right_Canceled.performed += OnRightGripCanceled;
This is done.