04-06-2020, 10:49 AM
(04-06-2020, 10:13 AM)josemendez Wrote: A collision with any object means that contact points have been generated between the rope and the object. You can't have a collision with no contact points generated.
Now, performing any kind of filtering over the contacts requires to iterate over them at least once. Even when Unity calls OnCollisionEnter() for a given pair of objects, internally it has iterated trough all contacts in the scene to find out what callbacks to call.
Broadly speaking, there's no way to tell if an object is or isn't in a list without looking at all objects at least once.
So, the easiest (and only) way to do what you need (in any engine) is to iterate over the contacts list once and pick whatever objects you need.
Ok, thank you soo much