Hiya,
I have several objects with rigid bodies and when they collide with a master object I would like something to happen to them.
However I don’t want anything to happen when they collide with each other… just the master object.
Is this possible?
thanks!
Hi @davidj2022,
Yes, you can do that using the ContactResult returned on each collision hit. It contains a reference to the other entity the body has touched with, which you can use to check if it’s your master entity or not:
https://developer.playcanvas.com/api/pc.ContactResult.html
3 Likes