WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #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
  #2  
Old 07-05-2010, 02:58 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,455
You can zero out any forces already added with the <node3D>.reset method.
Reply With Quote
  #3  
Old 07-11-2010, 12:03 AM
moneim230 moneim230 is offline
Member
 
Join Date: Oct 2009
Posts: 18
Lightbulb

Quote:
Originally Posted by Jeff View Post
You can zero out any forces already added with the <node3D>.reset method.
thanks Jeff
i have a question here
is there a better way than this (calling a function with 0 timer) to update the value of the force
actually i am working on a vehicle model and i need to get the inertia force applied when i leave the gas pedal
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
help with augmented reality and physics Darkmax Vizard 1 06-12-2010 03:26 PM
RE:Slide Joints and physics optimization nige777 Vizard 4 06-22-2009 04:21 PM
Physics and Haptics jalvarez Vizard 3 07-16-2008 03:03 PM
collision with physics enabled joeymax Vizard 2 04-17-2008 02:49 PM
another physics question adimov Vizard 1 07-22-2004 03:56 PM


All times are GMT -7. The time now is 08:47 AM.


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