[SOLVED] 360 Degree Joystick Control Using Gamepads

I’ve been working on a Top down shooter game, and I have begun adding controller support using the Gamepads extension. Is there way to return exactly what angle the joystick is being pushed, I know that I can get 8 directional aiming to work with up, down, left, and right, but is there a way to get more precise than that and find out exactly how far which direction is being pushed or which angle the stick is being pushed towards?

Yes. You’ll want to use the Gamepads::StickRotation() and Gamepads::StickForce() expressions, you can find them in the expression builder.

One gives which angle the stick is rotated at, and the other gives you the force. You’ll need to figure out how to apply them to your events, but you can likely use the stick rotation + stick force to get your angle of movement + speed.


I literrally just found those, and I feel incredibly dumb…

Not dumb at all, it’s just a reminder to use the expression builder more.

I had to force myself to learn that a lot over my first few months with the engine.