I wrote a simple program which shows current X and Y values of my controllers left stick and the angle the current current motion is representing. I noticed somewhere around 60° the X value starts to decrease until by 0° it is 0. Between like 58° and like 121° the X value is maxed. Here are some example outputs:

Max Values are between -127.996094 and 127.996094

60° motion:

Code: Select all

```
LX: 127.996094
LY: -73.789063
L motion: 60.04
```

90° motion:

Code: Select all

```
LX: 127.996094
LY: 0.500000
L motion: 90.22
```

140° motion:

Code: Select all

```
LX: 88.843750
LY: 107.917969
L motion: 140.54
```

Above I read actual controller X and Y values of my controller and calculated the Angle. What I want is the other way around. I want to calculate X and Y values for a given angle.

By looking at the values above I couldn't figure out the maths. I would love any input from you guys. Stay healthy and cheers!