Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var camSpeed = 10;
- function Update ()
- {
- var camTrans = Camera.main.transform;
- camTrans.Rotate(0, Input.GetAxis("rotate"), 0, Space.World);
- camTrans.position += new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical")) * Time.deltaTime * camSpeed;
- camTrans.position += camTrans.TransformDirection(new Vector3(0, 0, Input.GetAxis("Zoom")) * Time.deltaTime * camSpeed);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement