You can create a custom event in vizconnect that's triggered using a signal from an input device:
- Add an input device from the Inputs tab, in this case the joystick
- Go to the Events tab in Vizconnect, add an event and give it a name (e.g. MY_EVENT)
- Press the mappings button to define the input signal (button number) that triggers the event
- In the application script, register a callback function for the event:
Code:
def myFunction(e):
print 'event triggered'
viz.callback(viz.getEventID('MY_EVENT'), myFunction)