[ODE] Question about variable step size and collision detection

Per Bull Holmen pbholmen at yahoo.com
Sat Dec 16 11:23:15 MST 2006


I know questions about variable step sizes have been
asked many times before. I see that there's much
resistance in the community against making it work
too. Anyway, I have a question that I haven't found an
answer to through searches in the archive:

I am planning to make a 2D game, and am in need of a
physics engine. It must be cross-platform (OS
X/Windows), so many other libs aren't usable. I
thought ODE would be great until I discovered all the
warnings against variable step sizes. As far as I can
see, ODE's own collision detection requires the
objects to overlap. This is unusable for my purpose,
cause it involves fairly small objects moving fast -
it would cause errors. So I thought about implementing
my own collision detection, one that detects whenever
two objects trajectories will intercept. If it happens
before the next regular step, the physics engine might
step forward to the time the objects are supposed to
collide, and the collision detector might report the
collision, normal vector, etc. I don't want to start
for hours and hours implementing this, if it won't
work. The shorter steps will probably be few, but in
some situations they will be plenty. Is it still
unfeasible to make it stable?

Anyway, other developers have surely had the same
problem before? What are other possible solutions to
step size/collision detection with fast moving or
small objects? Would it work to step the engine a
regular step, report the collision possibly with a
rather high depth value, and let ODE adjust things
accordingly? I can imagine a number of difficult
situations arising from this, but if ODE can fix it
I'm happy. If there is no solution I'll have to look
for another lib, but I don't want to do that... :(


Alt i én. Få Yahoo! Mail med adressekartotek, kalender og
notisblokk. http://no.mail.yahoo.com

More information about the ODE mailing list