init
This commit is contained in:
commit
7be44fd86c
37 files changed
+3337
No files matched your search
Executable
+17
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class CameraController : MonoBehaviour {
|
||||
public float speedH = 2.0f;
|
||||
public float speedV = 2.0f;
|
||||
|
||||
private float yaw = 0.0f;
|
||||
private float pitch = 0.0f;
|
||||
|
||||
void Update () {
|
||||
yaw += speedH * Input.GetAxis("Mouse X");
|
||||
pitch -= speedV * Input.GetAxis("Mouse Y");
|
||||
|
||||
transform.eulerAngles = new Vector3(pitch, yaw, 0.0f);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user