OimoPhysics icon indicating copy to clipboard operation
OimoPhysics copied to clipboard

add ghost rigid body feature

Open saharan opened this issue 3 years ago • 3 comments

related to #34 just giving callbacks with no physical affection

saharan avatar Jan 24 '22 15:01 saharan

Hi, how do we do ? any example ?

lo-th avatar Jun 18 '22 16:06 lo-th

I added in in my specific fork that i created for a university game engine i help building. It's a very basic integration of the feature, but it does add a triggerEnter/triggerExit state, that is firing a usable event, similar to the existing collision events, and it's based on the shape of the trigger, so it works with any convex meshes.

The feature is independent of bodyType or group, any rigidybody can be a trigger by setting the isTrigger flag on it.

Currently working on a terrain integration, but i'm kinda stuck and need to understand the basic of the oimo engine better. Adding triggers was doable with just a few lines of code, biggest problem was to make it so that, you get all points of contact returned as if it does collide but then do not further process them, in the correct way, so the standard collision is not interfered by this.

https://github.com/Dev-MarkoF/OimoPhysics (I forked from the adapting Haxe 4.0 Dev Branch and applied most of the fixes saharan later used in the merger to master myself, but i'm an adept in physics programming, so the implementation of ghost bodies / trigger is just slapped in)

Dev-MarkoF avatar Jun 20 '22 05:06 Dev-MarkoF

Any progress about this?

Geequlim avatar Jul 03 '22 07:07 Geequlim