![]() |
#2
|
|||
|
|||
Yes, each call to vizjoy.add() will return the next available joystick. Here is a sample script that shows how to connect to multiple joysticks:
Code:
import viz import vizjoy viz.go() joy1 = vizjoy.add() joy2 = vizjoy.add() def joydown(e): if e.joy == joy1: print 'Joystick 1 button',e.button,'pressed' elif e.joy == joy2: print 'Joystick 2 button',e.button,'pressed' viz.callback(vizjoy.BUTTONDOWN_EVENT,joydown) |
|
|