View Single Post
  #1  
Old 07-03-2010, 11:41 AM
moneim230 moneim230 is offline
Member
 
Join Date: Oct 2009
Posts: 18
Question Physics - addThruster

Hello,
i applied a constant force on an object and i wanted to change its value
Code:
F=[0,0,0]
def UpdateThruster():
	force=ball.addThruster(mode=viz.ABS_GLOBAL,force=F)
vizact.ontimer(0,UpdateThruster)

def onKeyDown(key):
	if key == ' ':
		F[2]=1

viz.callback(viz.KEYDOWN_EVENT,onKeyDown)
i found that the force is accumulated each time the function UpdateThruster happens
so, when i press space once, the ball starts accelerating very fast
please i need to apply a force and change its value anytime i want...how can i do this ??

Last edited by moneim230; 07-03-2010 at 11:45 AM.
Reply With Quote