Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma strict
- var movespeed =2;
- function Update ()
- {
- var updown : float = Input.GetAxis ("Horizontal") * movespeed;
- updown *= Time.deltaTime;
- if (Input.GetKeyDown(KeyCode.E))
- rigidbody.AddRelativeTorque (Vector3.right* updown);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement