LitDev Extension API
LDController

Get input from one or more USB attached game controllers (e.g. gamepad or joystick). If there is more than 1 attached device, then they are numbered from 1.
SlimDX runtme for .Net 4.0 requires to be installed before this object can be used (http://slimdx.org/download.php).
Buttons
![]() |
Count
![]() |
Position
![]() |
POV
![]() |
Rotation
![]() |
Sliders
![]() |
Buttons(controller)

Get the pressed state of controller buttons.
controller A USB attached controller number (e.g. joystick or gamepad) indexed from 1.
returns An array of button states ("True" or "False")
Count

Get the number of attached controllers.
Position(controller)

Get the position of a controller joystick.
controller A USB attached controller number (e.g. joystick or gamepad) indexed from 1.
returns An array of (X,Y,Z) position values (-100 to 100)
POV(controller)

Get the POV (Point Of View) of controller.
controller A USB attached controller number (e.g. joystick or gamepad) indexed from 1.
returns An array of (X,Y,Z) POV values (degrees)
Rotation(controller)

Get the rotation of a controller joystick.
controller A USB attached controller number (e.g. joystick or gamepad) indexed from 1.
returns An array of (X,Y,Z) rotation values (-100 to 100)
Sliders(controller)

Get the slider position of controller sliders.
controller A USB attached controller number (e.g. joystick or gamepad) indexed from 1.
returns An array of slider positions (0 to 100)