Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Fluid Particles interaction Script
#26
Hi Jose Carlos,
Just call GameObject.Destroy() passing the object reported by the contact.

The manual describes how to retrieve the collider involved in a contact:
http://obi.virtualmethodstudio.com/tutor...sions.html

So the code would look like this:

Code:
ObiColliderBase collider = ObiColliderWorld.GetInstance().colliderHandles[contact.other].owner;
GameObject.Destroy(collider.gameObject);

The script you posted pretty clearly hints at where to place it Guiño:
[RequireComponent(typeof(      ObiSolver      ))]
Reply


Messages In This Thread
RE: Fluid Particles interaction Script - by josemendez - 27-11-2020, 09:04 AM