I know how to use autoCollide, and I know about the surface table.
I just don’t know how to get that information out of that table for my own collision callback.
The thing is that the only way I see for making area triggers, and maybe some other things, with autoCollide is to call autoCollide a few times during a simulation step. It seems like I would need to create the area triggers, call autoCollide, destroy the triggers, clear the collision joint group, to make sure that the area trigger collisions only cause collision event to be sent, but do not participate in the rest of the process (i.e. that things won’t bounce off of them and can penetrate them), and than call autoCollide again to make the actual collisions (this time without the Area Triggers existing in the ode space).
Now, I think, and correct me if I’m wrong, that calling autoCollide a few times and creating and destroying the Area Triggers’ (and Rays’) OdeGeoms during every simulation step is a waste. I though of a more efficient (at least I think it’s more efficient, again, correct me if I’m wrong) way of doing that, which is as follows:
- Make my own collision callback handling function.
- Put Area Triggers, Rays, perhaps Kinematic Objects (like character controller) etc. into different lists.
- Use the custom collision callback function to check every object against those lists to find out how to handle it (as a trigger, as a kinematic objects etc.).
Now, will that idea be more or perhaps less efficient than running autoCollide more than once during every single step, and still running through a few lists to recreate and destroy stuff?
And if it will be more efficient, how can I get to that surface data, because I see no way of doing that from Python…?
Also, maybe there is some other way, but I haven’t found any way of setting OdeGeoms to “area triggerish” behavior, and even though collision events do the job of notifying me about a collision, I see no way of preventing ODE from preventing penetration on selected objects.
Coppertop
EDIT:
Ok, it seems like sometimes I just try too hard xD. For some reason I though I just HAVE TO use the OdeWorld’s SurfaceTable even with my own Collision handler, while I do not… I’ve made my own list for surface data and it all works like a charm. I have to make my thinking more flexible in such cases xD. Thanks
Coppertop