Sign in to follow this  

Analog stick values not smoothly changed

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: 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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this