Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Fluid Particles interaction Script
#28
(27-11-2020, 02:38 PM)JoseCarlos S Wrote:             // this one is an actual collision:
            if (contact.distance < 0.01)
            {
                ObiColliderBase collider = world.colliderHandles[contact.other].owner;
                if (collider != null)
                {
                    ObiColliderBase collider = ObiColliderWorld.GetInstance().colliderHandles[contact.other].owner;
                    GameObject.Destroy(collider.gameObject); // do something with the collider.
                }
            }

This won't compile because you're defining "collider" twice. Fixing it is left as an exercise to the reader Guiño (you should really be able to fix simple things as these, but let me know if you struggle too much with it).
Reply


Messages In This Thread
RE: Fluid Particles interaction Script - by josemendez - 27-11-2020, 02:53 PM