How can I rotate an object in a single axis representing the position of the thumbstick on a gamepad

Hi, I’m a very new user, this is my first project and I’m sure what I’m looking for is very easy but I’ve been struggling.

I’m making a 2D platformer kind of (it’s just a mini project to get better, nothing serious)

I have an omnidirectionnal dash setup where I launch my character in whatever direction my joystick is facing.

I want to create either an ingame element (such as a cone) or an HUD element (like an arrow) representing the 2D position of my joystick. To essentially get a preview where my character will launch towards.

But I can’t figure how to translate the Y and X axis values I get from my gamepad to a seemlees 360 degree rotation for an element.

I’ve only been able to achieve -90 to 90 degrees using the X axis, but can’t seem to combine the two.

I’m a very beginner so If someone can take the time to walk me through a solution, I would very much appreciate it.

Here’s the blueprint

Relative or World rotation depends on your Components hierarchy.

3 Likes

Thank you so much !
You’ve ended a 2 day struggle aha

1 Like

You are welcome :slightly_smiling_face: you can also use your X and Y to make a Vector and this is your direction vector