Playstation DualShock Controller

From Derivative
Jump to navigation Jump to search

Playstation DualShock controllers can be used as input devices for TouchDesigner.

DualShock2.jpg

PS3 DualShock and Sixaxis controllers[edit]

What you'll need for a Playstation3 controller:

The PS3-Windows driver must be selected in the Joystick CHOP's Joystick Source parameter. No motion controls supported at this time.

PS2 DualShock controllers[edit]

What you'll need for a Playstation2 controller:

The PS2-USB adaptor must be selected in the Joystick CHOP's Joystick Source parameter.

TIP: If the PS2 controller is connected to the computer after TouchDesigner has started or after the PS2Dualshock.tox component was added to the network, then the joystick adaptor must be reslected from the Joystick Source menu. If you are using a different PS2-USB adaptor, it will also need to be reselected from the Joystick Source menu.

The Network Explained[edit]

The image below shows the network of these components. TouchDesigner creates data channels from the controllers through the Joystick CHOP.

The math1 CHOP simply inverts one of the analog sticks for consistency. The rename1 CHOP renames all the channels created by the Joystick CHOP into something more meaningful. You can edit the rename parameters here if you would like to change the naming of any controls (the analog stick and directional pad channels are verbose for clarity, shorter names could be used).

The math2 CHOP adjusts the range of the analog sticks and directional pad. It is re-mapped such that neutral is 0. Horizontally, left is 0 to -1, right is 0 to 1. Vertically, down is 0 to -1, up is 0 to 1.

The constant1 and replace1 CHOPs are added so that if the joystick is not present at startup, the channels still will be present in your CHOP network using default values. If you rename your channels in the rename1 CHOP, be sure to update constant1 with your new channel names.

TIP: Make sure the Analog button on the controller is on, the red LED should be on. If not, the analog sticks will not work.

PS2DualshockNetwork.jpg