/* attempt to deal with prototype, bootstrap, jquery conflicts */ /* for dropdown menus */

Jump to content

Image of the Day

What's the best way to move your heavy stuff? Using a power loader! #spacr #screenshotsaturday 💪🤖💪 https://t.co/sOjz2XNVeq
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net's newsletters to receive the latest updates and exclusive content.


Sign up now

Gamepad Deadzone

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 Grain   Members   

500
Like
0Likes
Like

Posted 17 August 2013 - 03:09 AM

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. 



#2 unbird   Members   

8298
Like
0Likes
Like

Posted 17 August 2013 - 03:29 AM

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 
}


#3 Grain   Members   

500
Like
0Likes
Like

Posted 17 August 2013 - 02:33 PM

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.  






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.