# Xbox One Controller Analog Stick Get (Angle/Rotation)?

Hello currently I have an Xbox One controller setup to use in my project. The problem im facing is that the input axis only returns the angles in 45 degree increments. What I want is the return value of where the analog stick is facing from 0 - 360 degrees either precisely or in steps of 10s 5s 1s etc. Currently this is the blueprint logic setup so far. Can you say which function you call to get that angle so i can study it for you?
Maybe screen blueprint?

check the attachments its there just didn’t show

Whats that graph? It computes the angle?

Yes. Using input axis then converts it into a rotator so that whatever directIon the analog stick points it should return that angle

Here’s a simplified version. Im trying to get the look at direction whenever I point the controller joystick in a given directions. So far its working

but in only increments of 45 degrees. Any help would be much appreciated.

Hello twinnaz06 ,

Not sure if you already have a solution for this, but I will post what I came up with for you or anyone else that might find it useful.

I used an Atan2(Degrees) node with the axis of the joystick I am measuring as inputs. Below is the Function I made.

Here is the function in use. AttackForward and AttackRight are the axis that I mapped to my controller joystick. I am using it to change the direction that my character is facing, but you should be able to adapt it to your code.

Let me know if this works out for you!

Cheers,

1 Like

thanks I have found a solution im also going to try out yours once I get everything up and running again

I know this is old but I was wondering if there’s any way to do the opposite of this? Take degrees and convert them into 2 digits like that?

Fantastic, exactly what I was looking for!

From what I understand, the forward and right axis are the X and Y input axis.

You can imagine the position of the stick as a 2D vector, with the X and Y values representing how far left and up you need to go to reach that position. This function returns the orientation of such vector. To do the opposite, you would also need to know the magnitude, aka how far the stick is from the center going in a straight line. You can’t get the components from the angle only because there are endless combinations of components that can result in the same angle, each one implying a different magnitude.

Rehket, thank you!