Collision End Event?

Hi folks, I was wondering if there is an ‘easy’ way to determine when a collision event has ended?

Currently I’m implementing PhysicsCollisionListener, and I see that while the collision is occurring the collision(PhysicsCollisionEvent) method is getting invoked repeatedly…is there anyway to determine, when the collision has ended from the Event Object or is about to end? Or is there perhaps some other event that can be registered to get the end event?

thanx :slight_smile:

put a boolean at the end of the collision method? and check the value of that?

there is no ‘easy’ way that I know of. You will need to look into Physics Tick Listeners. You will basically need to use your PhysicsCollisionListener to keep track of if a collision has occurred, then within physicsTick() check if a collision happened in the previous tick (you will need to store this, a simple flag will do), but not since then (this current tick), then the collision has finished.

yeah, I had hunch I was going to have to use a PhysicsTickListener…was hoping there was cleaner way, but that will do.