[ODE] Infinite sliding... ?

David Walters hidden.asbestos at googlemail.com
Fri Aug 18 05:54:44 MST 2006

> If we made this change, how would collision testing be performed? If
> testing is still done once per rendered frame, we would end up with a
> variable number of steps between tests putting us right back where we
> started. How do you folks run multiple physics steps between collision
> passes?

This is my physics update method. It forms part of my fixed dt loop
and it runs at 1:1 with the rest of the game logic...

// FcPhysics::Tick
void FcPhysics::Tick( const HtFloat dt )
	BLOCK_ENTRY( FcPhysics::Tick );
	PROFILE_ENTRY( FcPhysics::Tick );

	// Clear contacts from the previous frame.
	dJointGroupEmpty( m_contact_group );

	// Generate contact joints for collisions.
	dSpaceCollide( m_space, &m_surface_parameters, &collision_callback );

	// Do ray callbacks.

	// Tick the world.
	dWorldQuickStep( m_world, dt );

(Any suggestions are welcome :-) )

Step alterations should still allow this code to perform all of these
actions once with minimal fuss. Collision needs to be detected as soon
as possible, not after X steps.

This is why I'm not sure we should be introducing _any_ timing
compensation code into the ODE core as I don't think it'd much use to
anyone - It seems like a better idea to write a simple fixed dt
stepper and use it consistently in the tests, so that newcomers can
look at it and see what's the best thing to do - but with the ability
to add extra stuff to it without disturbing ODE.


ps. Has anyone had a chance to try my patch from last night? Is it a
change we should apply regardless of what extra functionality is added
for timing? I realise there might be a 'perfect' step function written
at some point that can accept a dynamic delta-time, but isn't that
something we can leave to deal with when it happens?

More information about the ODE mailing list