|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Logitech Gamepad: Dpad programming?
Does anyone know what axis the dpad is called on the logitech controller?
|
|
#2
|
||||
|
||||
|
Re: Logitech Gamepad: Dpad programming?
You may want to check out the class that's posted here.
To directly answer your question though, it's a combination of axes 5 (x) and 6 (y). Code:
if (x < -0.5 && y < -0.5)
return kUpLeft;
if (x < -0.5 && y > 0.5)
return kDownLeft;
if (x > 0.5 && y > 0.5)
return kDownRight;
if (x > 0.5 && y < -0.5)
return kUpRight;
if (y < -0.5)
return kUp;
if (x < -0.5)
return kLeft;
if (y > 0.5)
return kDown;
if (x > 0.5)
return kRight;
return kCenter;
|
|
#3
|
|||
|
|||
|
Re: Logitech Gamepad: Dpad programming?
Thanks for the help.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|