How to detect if 2 physical objects is still touching or not?

After collision, I want to check when an object separate from another object. I’ve seen event.contact.isTouching but when I used that, it just continue turning true value but do not return false. Is there someone have an advice for this?

Look for the “ended” phase in the ‘collision’, OR use the ‘postCollision’ event to detect the end.

Thank you roaminggamer, I will go checking that event :smiley:

Hi @jademwit,

The “ended” phase of the normal “collision” event should work fine for most purposes. Post-collisions are a little more unique and should be used for special cases. If you care to learn about them, see the recent tutorial I wrote on the topic:

https://coronalabs.com/blog/2015/03/31/tutorial-utilizing-physics-post-collisions/

Brent

Look for the “ended” phase in the ‘collision’, OR use the ‘postCollision’ event to detect the end.

Thank you roaminggamer, I will go checking that event :smiley:

Hi @jademwit,

The “ended” phase of the normal “collision” event should work fine for most purposes. Post-collisions are a little more unique and should be used for special cases. If you care to learn about them, see the recent tutorial I wrote on the topic:

https://coronalabs.com/blog/2015/03/31/tutorial-utilizing-physics-post-collisions/

Brent