InputUse & InputGrab Events have incorrect HandType for Gamepad Triggers
tracked
Hiyu
In Udon, the InputUse and InputGrab events are sent by Use and Grab inputs, and pass several parameters to Udon programs, including HandType (whether it's the left/right hand). On gamepads, Use and Grab are combined, and both gamepad triggers can be pressed to use them.
The problem: Both the Left & Right triggers register as HandType.RIGHT, meaning that no distinction can be made between the Left and Right triggers in Udon for gamepad controls, which currently limits our possible control schemes for worlds.
For example, I'm making a movement-heavy world inspired by a freerunning game where the left trigger is jump, and the right trigger activates special abilities. Left trigger was chosen because it allows the player to continuously use both analog sticks to keep moving, without having to lift their thumb off the right stick to jump.
I'm currently unable to distinguish between these two triggers, leading to a more interrupted experience on mobile devices and desktop when using a gamepad, since moving and jumping are often required simultaneously.
This appears to be a bug, as each trigger is only ever pressed with its corresponding hand, yet both register as Right. If there is a better VRChat-friendly way of distinguishing the two triggers from each other, then it has eluded my testing.
Log In
StormRel
marked this post as
tracked
Hiyu
I've found that calling Input.GetAxis("Joy1 Axis 4") and Input.GetAxis("Joy1 Axis 5") work for the left and right triggers on PC. They return -1 for triggers untouched, 0 for half-pressed, and 1 for fully-pressed.
This doesn't work on iOS - I haven't found any axes set up for the triggers.