I'm trying to create a top down shooter using gamepad. I'm using angle(0, 0, Gamepad.Axis(0, 2), Gamepad.Axis(0, 3)) so my character can move using the right analog stick. It works fine but it always returns to 0. How do I stop that?
Add a "deadzone" - only set the angle if any of the axes value is greater than (-5,5)
abs(Gamepad.Axis(0, 2))>5 or abs(Gamepad.Axis(0, 3))>5 -> Player set angle to angle(0, 0, Gamepad.Axis(0, 2), Gamepad.Axis(0, 3))
Thanks for the help!
Develop games in your browser. Powerful, performant & highly capable.
It worked perfectly.