duck

duck

Sep 7th, 2010
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.29 KB | None | 0 0
  1. var ball : GameObject;
  2.  
  3. function Start()    
  4. {
  5.     ball.rigidbody.velocity.y = -5;
  6. }
  7.  
  8. function OnCollisionEnter (other : Collision)
  9. {
  10.         if (other.gameObject == ball) {
  11.                 other.rigidbody.AddForce(Vector3.up * 0);
  12.                 other.rigidbody.velocity.y = 15;
  13.         }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment