View Single Post
  #2  
Old 05-13-2010, 03:08 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You could modify the updateCar function to use the wiimote buttons to control the car. For example, you could replace:
Code:
#Use y position of joystick to compute forward car movement
forwardMovementAmount = viz.elapsed() * MOVE_SPEED * -joyPOS[1]
car.setPosition( [ 0, 0, forwardMovementAmount], viz.REL_LOCAL )
with:
Code:
if wiimote.isButtonDown(wii.BUTTON_UP):
	forwardMovementAmount = viz.elapsed() * MOVE_SPEED
	car.setPosition( [ 0, 0, forwardMovementAmount], viz.REL_LOCAL )
Reply With Quote