[ODE] Mixing simulation with basic keyframe data.

Martin C. Martin martin at metahuman.org
Thu Jul 3 06:49:02 2003


> the one sticking point I have is
> with integrating very basic (non-simulated) keyframe
> data with the simulation.

This really is a FAQ, anyone interested in adding the answer to the wiki?

> I first tried to just manually update the
> position and rotation of the geom based on the current
> transform of the animated level geometry -- no go, my
> vehicle just sort of falls through rising platforms
> (and encounters other similar problems) which is
> pretty much what I expected to happen when the geoms
> were not attached to bodies.

That seems strange to me.  The new location of the vehicle should collide
with the new location of the geom, and your nearcallback should get
called, which would generate contact joints.  Is your nearcallback getting
called for the moved geom and the vehicle?  What if you use a simple space
instead of a hash space?

> My end goal is just a simple way to transfer the
> position and rotation information from my animated
> geometry nodes back into my ODE geoms.

Well, simply moving the bodiless geom should do most of that, although the
velocity constraint of the contact joints won't be right.  Russ, how hard
would it be to add velocity info for the no-body case to
dJointCreateContact()?

Another option is to use bodies & motors.  Use the motor to force the body
(and therefore the geom) to the desired location every timestep.  But I
think that would increase the DOF of your simulation, making it slower.

- Martin