Guest User

Untitled

a guest
May 23rd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var pickedup = false;
  2.  
  3. function OnCollisionStart (collision : Collision) {
  4.     if (collision.gameObject.tag == "spear") {
  5.         Debug.Log("hit");
  6.         Destroy(collision.gameObject);
  7.         Debug.Log("destroyed");
  8.             var pickedup = true;
  9.     }
  10. }
Add Comment
Please, Sign In to add comment