[ODE] Pushing a Body

John DeWeese deweese at ict.usc.edu
Mon May 5 02:35:02 2003


Oh yeah, there's a utility function, dWorldImpulseToForce(world, 
stepsize, impulse_x, impulse_y, impulse_z, result_force). Where the 
impulse is in units of (force * time). Then you can apply the result 
force with dWorldImpulseToForce just once. Warning: super-big 
masses/forces detract from numerical precision!

Eric Trousset wrote:
> I think you should try to apply an impulse.
> the diference between a force and an impulse is that the farce has to be 
> integreted for some amount of time before it has a visible effect
> on the body, whereas and impulse acts as a huge force that is appied on 
> the body for a very small amount of time but gives it a lot of
> velocity.
>  
> Eric
> 
>     -----Message d'origine-----
>     *De :* Nathan Ostgard [mailto:nostgard@lvcm.com]
>     *Envoyé :* lundi 5 mai 2003 11:09
>     *À :* ode@q12.org
>     *Objet :* [ODE] Pushing a Body
> 
>     Hello,
>      
>         I've been wanting to try to integrate ODE into an engine for a
>     while, and just started messing around with it tonight. All of the
>     collision and response is working great, but I can't seem to figure
>     out one thing - how can I apply force to a body in the world to
>     "push" it in a direction? I've gone through the mailing list and
>     tried a million and one different ways, but I can't seem to get the
>     object to move.
>      
>         Specifically, I have a box object which is already at rest in
>     the world and I just want to push it up into the air (i.e., throw it).
>      
>         dBodyAddForce seems to have some (but VERY little) effect on the
>     body when it is in the air (it just bounces a little more when it
>     lands), but once it's landed on my ground plane, it has no visible
>     effect on the body whatsoever.
>      
>         Any ideas?
>      
>         Thanks,
>      
>     Nathan Ostgard
>     nostgard@lvcm.com <mailto:nostgard@lvcm.com>
>