Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ropearound like physics
#9
(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 Sonrisa
Reply


Messages In This Thread
Ropearound like physics - by relevantname - 03-06-2020, 04:43 PM
RE: Ropearound like physics - by josemendez - 03-06-2020, 04:48 PM
RE: Ropearound like physics - by relevantname - 03-06-2020, 08:18 PM
RE: Ropearound like physics - by josemendez - 04-06-2020, 08:06 AM
RE: Ropearound like physics - by relevantname - 04-06-2020, 08:46 AM
RE: Ropearound like physics - by josemendez - 04-06-2020, 09:24 AM
RE: Ropearound like physics - by relevantname - 04-06-2020, 09:57 AM
RE: Ropearound like physics - by josemendez - 04-06-2020, 10:13 AM
RE: Ropearound like physics - by relevantname - 04-06-2020, 10:49 AM