Advertisement
obernardovieira

[Unity3D] Check if object colliding with another

Oct 28th, 2013
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #pragma strict
  2.  
  3. public var ccollider : GameObject;
  4.  
  5. function OnCollisionEnter (hit : Collision)
  6. {
  7.     if(hit.gameObject.name == ccollider.name) {
  8.         print("check");
  9.     }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement