This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
project-undercover/Project Undercover/Assets/Scripts/Spy/SpyCameraController.cs
2017-10-03 04:15:13 -05:00

18 lines
400 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SpyCameraController : MonoBehaviour {
private float camSens = 100.0f;
private float xRotation;
void Start () {
xRotation = 0.0f;
}
void LateUpdate () {
xRotation = Time.deltaTime * Input.GetAxis ("Horizontal") * camSens;
transform.RotateAround (Vector3.zero, Vector3.up, -xRotation);
}
}