how do analog sticks avoid counting “snapping back” as an input?

652 views

When you let go of an analog stick it snaps back to the center, how is this not counted as an input? Is this an hardware or a software thing?

In: Technology

7 Answers

Anonymous 0 Comments

analog sticks dont generally care bout how the stick moves, they care bout the offset from the center position.

Anonymous 0 Comments

Most analog sticks don’t measure movement of the stick, they measure its position. Specifically its distance from center, and in which direction.

So the stick snapping back to center means the input is now zero.

If you ever had an old and worn Nintendo 64 controller, you’ll be familiar with how the system responds to an analog stick snapping back to not-quite-center. Your finger is off the stick, it’s not moving, but the controller still sends an input.

Anonymous 0 Comments

In most cases I’ve seen, releasing the stick causes the video game character to stop moving, does that count as an input?

Each joystick is made differently but mathematically, you can differentiate pushing on the stick vs releasing using the dr/dt of the analog stick position per frame. You can program your game to ignore whichever one based on that.

Anonymous 0 Comments

When the analog stick snaps back to center it is snapping back to zero. Yes it is counted as input, input to rest position. Yes there is a software element in modern hardware to dampen “overtravel” in HOTAS and steering wheel controllers, as well as typical gaming controllers. If you google “joystick sensitivity curves” you can find more info. Input devices like computer mice have this as well. It is handled by software and can be googled under “mouse acceleration.” If you have noticed that you haven’t needed to “lift and drag” your mouse in awhile like earlier computers required, this is why. I hope this helps you in your curiosity.

Anonymous 0 Comments

Imagine holding the analog stick away from center as being like using a gas pedal in a car. The farther you push either, the higher the output for movement. Let go of the stick or the gas pedal and the output becomes “I no longer want motion.”

Anonymous 0 Comments

If you press the stick all the way forward, you tell it “give me 100% movement forward”. Letting the stick to turns that 100% progressively down to 0% but never -%. If you hold it all the way in one direction and then move it back half way you’re tell it “move this way less”, you’re not telling it “move in the opposite direction”. Just like the other person said, letting go of the gas pedal doesn’t mean you brake or go backwards. It’s just decreasing an input, not sending a contradictory one.

Anonymous 0 Comments

Analogs typically have 2 potentiometers, 1 for up and down, 1 for left and right. Being in the middle should be a 0 value for both. Moving it up will raise the value, like windows joystick panel shows up to a value of 128. Pressing down gives a value of -128. Right would be up to 128 on the other potentiometer and left would be -128.
It’s up to game devs stuff like walking will be 0-80 and 81-128 would be running, etc. So pressing right all the way would be 128 and you letting go will snap it back to center which should be 0. Now potentiometers often dont really rest at 0. It may sit at 5, -6 let’s say. So devs have to decide something like any value between -10 to 10 will be considered 0. This is where stick drift comes in. Over time let’s say the sensors get looser and you’re center is now -11 on the left/ right potentiometer. Now you will walk left when you let go.

Side note arcade sticks are typically digital so no varying values like in an analog stick. So a super tight spring can potentially cause 2 inputs. Holding right and letting go quickly may make it snap left for a moment and trigger an unwanted input.