Jump to content
  • Advertisement
Sign in to follow this  

Analog stick values not smoothly changed

This topic is 4368 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

Hi everyone, I'm writing a game in c++ that's using directInput for gamepad support. I want the right analog stick to be used as a unit circle (simply an x & y vector between -1 and 1). I am using the DIPROPRANGE struct with SetProperty to set the minimum and maximum values of the axis (lMin and lMax properties) as explained in the msdn example here: http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dire... Anyway, I now get a value between +/-60,000 on the x and y axis - and then divide it by 60,000 to get the unit circle values (so it basically gives me a nice float value between -1 and 1). Now, the problem is that the values change very drastically and tend to snap to the 1/-1 values instead of giving me nice values in between. What happens as a result is that when I move my analog stick in a circular motion it basically jumps between 8 directions (top, top right, right etc.) instead of moving gradually between them. I know this is probably something that would be very hard to trace (could also be just cheap hardware), so I guess i'm just asking if someone's exprienced something like this before? Material on this subject on the net is very scarce... Thanks! Ehud.

Share this post

Link to post
Share on other sites
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!