WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 05-17-2010, 08:17 AM
Darkmax Darkmax is offline
Member
 
Join Date: Feb 2010
Posts: 108
use code tags please try this update car:
Code:
#Update position of car every frame
def updateCar():
	if wiimote.isButtonDown(wii.BUTTON_UP):
		forwardMovementAmount = viz.elapsed() * MOVE_SPEED
		car.setPosition( [ 0, 0, forwardMovementAmount], viz.REL_LOCAL )
	
	if wiimote.isButtonDown(wii.BUTTON_DOWN):
		backwardMovementAmount = viz.elapsed() * MOVE_SPEED
		car.setPosition( [ 0, 0, -backwardMovementAmount], viz.REL_LOCAL )
	
	if wiimote.isButtonDown(wii.BUTTON_RIGHT):
		rotationAmount = viz.elapsed() * TURN_SPEED
		car.setEuler( [ rotationAmount, 0 , 0 ] , viz.REL_LOCAL )
	
	if wiimote.isButtonDown(wii.BUTTON_LEFT):
		rotationAmount = viz.elapsed() * TURN_SPEED
		car.setEuler( [ -rotationAmount, 0 , 0 ] , viz.REL_LOCAL )

vizact.ontimer(0,updateCar)
And i think your car jump at first because the physics, maybe because they are colliding
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Create Button or Text Chrissy2009 Vizard 1 07-15-2009 06:34 PM
Wiimote in 4 sided Cave Sjaak Vizard 2 05-20-2009 02:05 PM
Mac Mini Sound Server ? djdesmangles Vizard 3 05-14-2009 01:44 PM
wiimote and sensor bar masaki Vizard 1 03-06-2008 04:07 PM
driving simulator paulpars Vizard 1 05-12-2006 12:46 PM


All times are GMT -7. The time now is 05:01 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC