[ODE] Pushing a Body

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


Well, what is the direction and quantity of the force vector? What is 
the duration over which you apply it? Accumulations are zeroed every 
frame. I had this problem when I wanted to push a button and have a box 
jump. I used an instantaneous force accumulation, but the quantity 
needed was so large (because my time step was so small) that I decided 
to go for a smaller force over a duration of 0.25 seconds instead. As 
long as the resulting acceleration is greater than gravity, you're good 
to go.

Nathan Ostgard wrote:
> 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>
>