Facepunch / sbox-issues

176 stars 12 forks source link

Input system not accounting for deadzone in some cases #2274

Closed A1steaksa closed 4 months ago

A1steaksa commented 2 years ago

Describe the bug

The axis' Input.Left and Input.Forward both don't take into account the stick's deadzone for some users.

To Reproduce

  1. In an AnimatedEntity's Simulate() method, add this code: Log.Info( Input.Left );
  2. Then slowly move the left control stick left until it prints a non-zero number.

Expected behavior

When moving a stick to just barely outside of its dead zone, Input.Left and Input.Forward should return a value very close to 0

Media/Files

image

Additional context

At least one other user, WYVERN, was unable to reproduce this issue and their Input axis' appears to be normalized between the inner and outer deadzone on their controller.

I'm not sure if this difference is caused by Steam Input, Windows 11, or what.

handsomematt commented 2 years ago

Dead zone should be all handled by Steam Input, look at your controller settings there?

A1steaksa commented 2 years ago

I can increase and decrease my deadzone within the Steam Input settings, but that just changes the first non-zero value of Input.Left and Input.Forward to be larger or smaller, depending on what I change on the deadzone.

This is consistent between an Xbox Series X and Playstation 5 controller, so I'm relatively sure it isn't a controller issue. As far as I can tell there isn't a setting in Steam Input that causes this.

If you're aware of one I can check on, I'd be happy to take a look at it

handsomematt commented 2 years ago

wos5bql9tb071.png

This should be set to Calibrate by default and then Steam automatically calibrates any dead zone stuff for you. It sounds like it's off for you or not properly calibrated.

handsomematt commented 2 years ago

Something to keep in mind is we're maintaining Source behaviour by default by multiplying the analog value from Steam Input by 1.5.

You can change this and get the same "raw" analog values in BuildInput

A1steaksa commented 2 years ago

I checked the deadzone settings within Steam Input and Deadzone appears to be set to Calibration by default. Setting it to None gives me what I would expect: values from 0.001 - 1 with no deadzoning of any kind. Configuration follows the values of the sliders below the Deadzone dropdown and gives the values I would expect between 0.001 - 1 with whatever deadzone I give it: image

Seems like Calibration is the only setting that gives me this trouble.

Is it possible it's an issue with Steam Input rather than S&box?

DevulTj commented 4 months ago

Not an issue anymore