Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to code function to get collided gameobject?
#2
(27-10-2017, 09:09 AM)skywaver Wrote: Hello. Thanks for nice physic plugin.

I need to detect gameobject which collides with Obi cloth, Obi tearable cloth.

I searched and found this:

[url=http://obi.virtualmethodstudio.com/tutorials/scriptingcollisions.html]

I'm not skilled on Obi cloth, so can I ask how to code function to get collided gameobject?

Thanks in advance SonrisaSonrisa

It's right there in the link:


Code:
Collider collider;
if (ObiCollider.idToCollider.TryGetValue(contact.other,out collider)){
// do anything you want with "collider"
}

cheers!
Reply


Messages In This Thread
RE: How to code function to get collided gameobject? - by josemendez - 27-10-2017, 10:11 AM