Enhanced Input Thumbstick doesn't give data back to 0

I’ve set up an Enhanced Input Mapping Context with Actions. Input is working well, but when I release the thumbstick I don’t see the input going back to 0? I’m doing this in VR, so I have the Right Thumbstick set up as an Action with Axis2D data. If I hold the thumbstick forward, I see the Y value go up to 1.0. If I bring it back to center slowly, I see it come back down to 0. But if I release the thumbstick and let it snap back to center, sometimes the last input I get has a Y value as high as 0.61!

Is there a way to tell when the thumbstick has been released (without polling in a Tick)? Or a way to set up the Enhanced Input so that this isn’t a problem?

1 Like

for things like analog input (joystick, analog-stick) capturing the default axis state is “typically” useless data, so the Enhanced Input if you are doing bindings to Triggered should only return values of !=0.0f

maybe binding to Completed or Canceled would give you the effect of “returned to neutral” though for Axis2d or Axis3d this should not fire if any axis is not zero.
though if there is the equivalent of “stick drift” or larger dead-zones this might cause some issues with this.

3 Likes

This is correct if completed set to 0 if triggering set to value that’s how I do it

2 Likes

Ah, that’s exactly it. Binding to the Completed event gives me the back-to-zero input I need. Thanks!

2 Likes

I was about to post the same question until this one finally popped up. I had the same issue using a mouse for the axis. I was getting values upwards of 20+ in both directions when moving the mouse too fast. This solution of resetting a variable on the Completed node fixed it too.

Thank you guys for your responses!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.