- Home /
Input axes freeze from opposite input rather than cancel out!
So when I press for example W on my keyboard then S after a while, the vertical input axis will continue reading 1 instead of cancelling out to 0. In input settings there is a checkbox "Snap", but it does not seem to do anything for the issue.
What is going on??
Answer by Bunny83 · Mar 17, 2014 at 12:21 AM
The problem here is that the axis are implemented with an acceleration. When you press both keys they will cancel out each other, but only the acceleration. Which means the axis will stay at it's current value (neither increase nor decrease).
There is no way to implement your desired behaviour with a single axis. What you can do is define two seperate axis, one for forward and one for backward and only set 1 key in each axis.
In your game logic you can simply combine both axis by adding (or subtracting) them together.