Jump to content
  • Advertisement
Sign in to follow this  
howie_007

Converting Analog controller stick values to degrees

This topic is 2973 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm using a gamepad controller to move an animated character as they run around the map. The goal is to have the character face the direction in which they are moving. So at this point I need to figure out how to take the values read in from the controller and convert them to degrees.

This is the order of rotation in my environment.
...180
90.....270
....0

My controller is capped to the value of 50. Below are the values you would see if pushing the stick in each of the 4 directions.
....50
-50....50
...-50

I'm not really sure how to approach this. Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!