[ODE] Kinematic objects

Chris Ledwith cledwith at d-a-s.com
Thu Oct 27 16:11:52 MST 2005


J. Perkins wrote:

>Has anyone tried implementing something like Novodex's "kinematic"
>objects in ODE? A kinematic object is a dynamics body that is
>controlled by the host application, rather than the simulation. Each
>timestep, the app must call setPosition() on the body to move it
>around, external forces have no effect. Internally, Novodex computes a
>force to move the body to the new position. Any dynamics objects that
>are in the path of the object get pushed out of the way.
>
>I was thinking that I might be able to handle this by putting
>kinematic objects in their own ODE world. I use a separate world so I
>can have zero gravity for kinematic objects, while regular dynamic
>objects have a non-zero gravity. All of the collision shapes would go
>into one space, but if a body is flagged kinematic it is treated as
>static world geometry for the sake of the collision (I would pass NULL
>into dJointAttach() instead of the body handle).
>
>Does this sound reasonable? Am I missing anything obvious?
>
>  
>
Yes, this works perfectly fine in ODE. I have been using "kinematic" 
geoms for my characters for years. Just do all the physics updating 
yourself (e.g. when falling, simple Euler approach,  integrate 
acceleration to get velocity, and integrate velocity to get position). 
They interact (contact joints) with ODE's simulated bodies just as you'd 
expect. You don't have to use a separate ODE world, or even separate ODE 
spaces (although of course you should think hard about your 'space 
design', for performance reasons).

-C




More information about the ODE mailing list