Sign in to follow this  
Grain

Gamepad Deadzone

Recommended Posts

Grain    500

Is there no way to change the size of  the dead zone you get from the control sticks. I know that if you pass the enum GamePadDeadZone into GetState() you can change the shape of it between either circular and square or turn it off all together. Is the only option here to pass GamePadDeadZone.None and write my own dead zone code? Seems like some pretty basic functionality for XNA to be missing. 

Share this post


Link to post
Share on other sites
unbird    8336
You could always implement this manually and even make it configurable (user options). Get your direction vector (GamePadState.ThumbSticks.Left/Right) and only react if the length is greater than some threshold.
 
if(someGamePadState.ThumbSticks.Left.Length() > 0.2f)
{
    //move ship 
}

Share this post


Link to post
Share on other sites
Grain    500

Yeah, I'm sure It won't be difficult to code up, I'd just prefer not to reinvent the wheel if XNA already had this function. Which is all I'm asking.  

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