SlimDx Joystick Deadzone question

Started by
0 comments, last by neumanndn 12 years, 5 months ago
[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]
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]








This topic is closed to new replies.

Advertisement