Convert vertical angle to horizontal angle (C#)

Hello, I am using the control freak plugin (http://forum.unity3d.com/threads/control-freak-the-ultimate-virtual-controller-for-unity-mobile.203823/) in my game.

I want to rotate my character in the direction the the user is moving the touch stick.

This touch stick is oriented verticaly, but I would like to convert this angle to an horizontal angle.

Here is an image for you to understand better:

alt text

I’m completly confused and don’t know from where to start to obtain the good new angle.

Thank you for your time :slight_smile:

This is regular math. By looking at the top angles we see that angles are offset by -90 degrees, but they have also opposite rotation directions. So we can add -90 to offset the angle and then multiply it by -1 to switch the direction.