I’m currently utilizing the Havok physics plugin. I understand that PhysicsBody provides a callback when two physics bodies collide. However, I’m having difficulty determining when these two bodies stop colliding, or separate. Could anyone provide some guidance on how to get notified when two PhysicsBodies no longer collide?
Any assistance or insights would be much appreciated.
I have a third-person character controller and a terrain, both with physics bodies. When my character jumps, they no longer collide, but when the character falls, they collide. I would like to track this state.
The WASM does write it out; just not exposed to the end interface right now, it looks like.
If you look at CollisionEvent.readToRef, it’s reading a subset of the CollisionEvent (from HavokPhysics.d.ts) from the buffer into a JS struct. The intBuf[0] contains the event type, so there should be events whose type is _hknp.EventType.COLLISION_FINISHED.value, which will be the “stopped colliding” event.