[ODE] Applying forces outside the phys loop vs applying them inside

Tyler Streeter tylerstreeter at gmail.com
Sat Nov 20 11:54:11 MST 2004


I created a set of motors (different from ODE's motors) that
automatically apply forces every time step.  Externally, though, you
just turn the motor on and off.  That way the forces get applied
inside the simulation loop, but you can still control them from
outside the simulation code.

I also have a set of force wrapper functions.  My force functions take
a duration value, and the simulation loop applies the force until the
duration runs out.

I hope that makes sense.

Tyler


On Sat, 20 Nov 2004 10:15:34 -0700, Megan Fox <shalinor at gmail.com> wrote:
> As it stands, I have a suite of functions on my physical component
> that exposes all the various force application functions.  However,
> I've found thus far that they aren't particularly useful when dealing
> with fine operations (such as the force application for a hovering
> body) when called external to the phys system, and I question if I can
> get repeatable behavior out of them at all short of sticking
> everything inside the inner phys loop.
> 
> Now the problem is, of course, that the phys loop ends up running at a
> much higher rate than the rest of the engine - the phys loop often
> takes two loops to the normal engine's one, leading to jittering
> hovering bodies and other such fun if the code is outside the inner
> loop.
> 
> My question is, has anyone else found "external" force functions like
> this particularly useful?  Aside from debug pushing things around, I'm
> worried I'll end up having to stick everything inside that inner loop
> if I want it to have any sort of fine-tune ability or control.  Any
> suggestions for a clean way of tethering the external logic in generic
> fashion to the internal loop?
> 
> Thanks,
> -Megan Fox
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>


More information about the ODE mailing list