Advertisement
Guest User

Untitled

a guest
Jul 25th, 2014
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #pragma strict
  2.  
  3. var movespeed =2;
  4.  
  5. function Update ()
  6. {
  7. var updown : float = Input.GetAxis ("Horizontal") * movespeed;
  8. updown *= Time.deltaTime;
  9.  
  10.  
  11. if (Input.GetKeyDown(KeyCode.E))
  12.  
  13.  
  14. rigidbody.AddRelativeTorque (Vector3.right* updown);
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement