I am making a top down shooter (As in directly top down, not slanted at all). When using the controller the right analog stick is used to aim, however, it seems to get stuck at the up, down, left, and right positions (relative to the camera which is looking down at the player).
It seems like the joystick output hangs around the positions where the values are a whole number (1 or 0). Is there any way to avoid this? When moving the stick back to the center it also tends to snap back to one of these positions.
Change the dead zones to zero in the input manager
Then you should probably program your own deadzone so it only uses the sticks input once the rightAxis vector.magnitude is above a certain threshold (do not normalize first)
Ah thank you, I had already tried making my own deadzone but I neglected to remove the built in one. Does anyone know why the axis values behave this way?
Normalising makes any vector have length (magnitude) of one (unit), but still points in the same direction.
Alot of maths specifically need unit vectors, but in your case, if you want to ignore stick input for small nudges of the stick, you can’t normalise your ‘rightAxis’ vector until you have checked it’s magnitude
I see, thank you very much! I am now using the same method for movement as well, and it feels much more fluid, and even more accurate when calculating speed! Is there a way to mark a thread as solved?