View Single Post
  #3  
Old 10-21-2016, 06:34 AM
Patrick Patrick is offline
Member
 
Join Date: Oct 2016
Posts: 13
Ok i now understand how you can assign the keys to the tracker via the input but i am missing the code for that

def update(event):
if rawInput['keyboard'].isButtonDown(3):
event.sendEvent(e=viz.Event(mag=1))
rawEvent[_name].setUpdateFunction(update)

basicly here i realise that .isButtonDown(3): is the command for the 2 key on the keyboard
but how do i for example trigger the B button on my xbox controller? i just dont seem to find the documentation for that.
All i found was the joystick basics: http://docs.worldviz.com/vizard/Vizjoy_basics.htm

I added the joystick as input to your example and tried to setup the event code afterwards but i cant really complete these lines

def update (event):
if raw_input['joystick'] <-i guess here is sth missing
event.sendEvent(e=viz.Event(mag=1))
rawEvent[_name].setUpdateFunction(update)

Sorry for bothering with that cause it feels like that must be one of the simpliest things but i just dont know how to go on
really appreciate your help

Last edited by Patrick; 10-21-2016 at 06:36 AM. Reason: missspelling
Reply With Quote