Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var ball : GameObject;
- function Start()
- {
- ball.rigidbody.velocity.y = -5;
- }
- function OnCollisionEnter (other : Collision)
- {
- if (other.gameObject == ball) {
- other.rigidbody.AddForce(Vector3.up * 0);
- other.rigidbody.velocity.y = 15;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment