saharan / OimoPhysics

A cross-platform 3D physics engine
MIT License
863 stars 68 forks source link

Trigger / Ghosting - Events / Callback #34

Closed Dev-MarkoF closed 3 years ago

Dev-MarkoF commented 3 years ago

Is it possible to have bodies that do "collide" but have no collision response. I currently implemented it with an aabb test between all bodies vs. a specific collision group (my trigger group, which is masked for collision)

But that does obviously not allow for trigger to dectect other rb's than a aligned boxes. I was going through the implementation of detection but i could not find a possibility to have a collision detection but no collision response, besides a callback.

Is there anything planed, or there that i did not see? Is the engine still in active development? Because i really like the very clear structure.

saharan commented 3 years ago

There's currently no feature of body ghosting that sends collision events without collision response. I see it's very useful and not difficult to implement, so I'd like to add the ghosting feature in a future release.

Dev-MarkoF commented 3 years ago

Thanks for Answering, i'm extremly pleased with Oimo 1.2.2 in the context i needed it.

Triggers and Heightmap Colliders are the only features missing to be perfect. I forked Oimo for now and implemented Triggers myself. By implementing a new property to the rigidbody and then throwing Events on Contacts, similar to normal ContactEvents. In the solver step the contacts marked as triggering contacts are ignored. (I did not encounter a bug introduced by that process yet, had a few at the beginning, but Oimo is really well written/documented, so the points of failure where found fast.)

Maybe you can take a look at it in case you plan to integrate that feature in the future.