SHARE
TWEET

Untitled

a guest Sep 14th, 2017 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var camSpeed = 10;
  2.  
  3. function Update ()
  4. {
  5. var camTrans = Camera.main.transform;
  6.  
  7. camTrans.Rotate(0, Input.GetAxis("rotate"), 0, Space.World);
  8. camTrans.position += new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical")) * Time.deltaTime * camSpeed;
  9. camTrans.position += camTrans.TransformDirection(new Vector3(0, 0, Input.GetAxis("Zoom")) * Time.deltaTime * camSpeed);
  10. }
RAW Paste Data
Top