View Single Post
  #3  
Old 03-16-2015, 11:34 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Yeah, the documentation is not very clear. You actually need to use the <dinput>.getXboxControllerList() to get a list of Xbox controller objects that provide the additional methods. They are different than the standard joystick objects created through <dinput>.addJoystick().

Here is a sample script that gets all the detected Xbox controllers and displays a config window for them:
Code:
import viz
import vizconfig
viz.go()

dinput = viz.add('DirectInput.dle')

for sensor in dinput.getXboxControllerList():
	vizconfig.register(sensor)

vizconfig.getConfigWindow().setWindowVisible(True)
Reply With Quote