How to detect objects within an OdeBoxGeom?

Hi -

It is likely that I just don’t ‘get it’, but I am a little bit puzzled on the subject of ODE collision detection :confused: .

I need to create a number of spawn points from which objects will spawn and drop down on the world via ODE physics. Prior to spawning a new object I have to ensure that nothing is in the spawn area. To achieve this I am creating an ODE ghost (body + geometry without mass) and would like to query the shape area (OdeBoxGeom) for contacts.

The thing is- how do I go about querying the collisions/contacts? I’ve read some postings talking about using the collision callback, but this is impractical as I always have >100 active objects causing a long list of contacts thus massive performance hit processing the event flood.

I am working on educational content which needs to perform on low end hardware so performance is a big issue.

There is a good chance I am just not understanding what is explained in the documentation and various posts so please accept my apologies. Can someone please explain or even better provide a sample on how to do this? Or maybe just point me to some documentation where I might get enlightened…


[ODE Middleware) – in here you’ll find my code that contains (among other things) ODE Area Triggers, which might be what you’re looking for. Or at least it might provide you with some kind of inspiration, or a starting point.

Note that I’m not using Panda ODE’s AutoCollide there, because I’ve found it (including it’s collision callbacks) not flexible enough.

Also, I’ve been unable to achieve Area Trigger functionality with AutoCollide at all, because I couldn’t figure out how to make it stop creating collision joints between what was supposed to be a trigger, and the geoms inside. As a result, the geoms just popped out of the trigger, as one would expect. Have you been able to do that with autocollide by creating a geom with a body and no mass?

Anyway, I think for such stuff using ODE’s mechanisms more directly, as I did it in my code, works better and provides far more flexibility that Panda’s automatic systems.

Hope that was somewhat helpful.