Jump to content
  • Advertisement
Sign in to follow this  
neumanndn

SlimDx Joystick Deadzone question

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

[font="Times New Roman"] [/font][font="Calibri"] [/font]

[font="Times New Roman"] [/font][font="Calibri"]I have a question on how to set the deadzone of a joystick’sxaxis. I have a good joystick instanceand am using a joystick that I’ve set the xaxis’s deadzone before in MDX.[/font]

[font="Times New Roman"] [/font][font="Calibri"] [/font]

[font="Times New Roman"] [/font][font="Calibri"]Here is my code I tried:[/font]

[font="Times New Roman"] [/font][font="Calibri"] [/font]

[font="Times New Roman"] [/font]joystick.GetObjectPropertiesById(JoystickObjects.XAxis).DeadZone = 500;

[font="Times New Roman"] [/font]

[font="Times New Roman"] [/font]What am I doing wrong? I get an exception of “File not Found”.

[font="Times New Roman"] [/font]

Share this post


Link to post
Share on other sites
Advertisement
Ok. no responses yet. I think I'll try this. please let me know if this is right?


[font="Consolas"][font="Consolas"][font="Consolas"][color="#2b91af"][font="Consolas"][color="#2b91af"][font="Consolas"][color="#2b91af"]

[font="Arial"]DeviceObjectInstance xAxis;

[font="Consolas"][color="#0000ff"][font="Consolas"][color="#0000ff"][font="Consolas"][color="#0000ff"]foreach[/font][/font][/font][font="Consolas"][font="Consolas"] ([/font][/font][font="Consolas"][color="#2b91af"][font="Consolas"][color="#2b91af"][font="Consolas"][color="#2b91af"]DeviceObjectInstance[/font][/font][/font][font="Consolas"][font="Consolas"] d [/font][/font][font="Consolas"][color="#0000ff"][font="Consolas"][color="#0000ff"][font="Consolas"][color="#0000ff"]in[/font][/font][/font][font="Consolas"][font="Consolas"] joystick.GetObjects())
[/font][/font][font="Consolas"][font="Consolas"] [/font][/font][font="Consolas"][color="#0000ff"][font="Consolas"][color="#0000ff"][font="Consolas"][color="#0000ff"]if[/font][/font][/font][font="Consolas"][font="Consolas"] ([/font][/font][font="Consolas"][color="#2b91af"][font="Consolas"][color="#2b91af"][font="Consolas"][color="#2b91af"]ObjectGuid[/font][/font][/font][font="Consolas"][font="Consolas"].XAxis == d.ObjectTypeGuid)[/font][/font]

[font="Consolas"][font="Consolas"] {

xAxis = d;

}

[/font][/font][/font][font="Arial"]joystick.GetObjectPropertiesById(([color="#0000ff"]int)xAxis.ObjectType).DeadZone = 500;[/font]

[/font][/font][/font] [/font][/font]








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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!