Advertisement
aandnota

Jump

Feb 22nd, 2013
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var jumpSpeed = 100.0;
  2.  
  3. function Jump(){
  4.     rigidbody.AddForce(Vector3.up*jumpSpeed);
  5. }
  6.  
  7. function Update(){
  8.     if Input.GetButton("jump"){
  9.         Jump();
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement