IMHOTEP Framework
Main Page
Related Pages
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Enumerations
Enumerator
Properties
Pages
Assets
Core
Debug
RotateCamera.cs
1
using
UnityEngine;
2
using
System.Collections;
3
4
public
class
RotateCamera
: MonoBehaviour {
5
6
public
float
speed = 1f;
7
8
// Use this for initialization
9
void
Start () {
10
11
}
12
13
// Update is called once per frame
14
void
Update () {
15
if
(( Input.GetMouseButton (0) || Input.GetMouseButton(1) || Input.GetMouseButton(2)) && Input.GetKey(KeyCode.LeftControl)) {
16
transform.localRotation = transform.localRotation * Quaternion.Euler (-Input.GetAxis (
"Mouse Y"
) * speed, Input.GetAxis (
"Mouse X"
) * speed, 0);
17
//transform.RotateAround( Vector3.zero, Vector3.up, -Input.GetAxis("Mouse X") * speed );
18
//transform.RotateAround( Vector3.zero, Vector3.right, -Input.GetAxis("Mouse Y") * speed );
19
}
20
}
21
}
RotateCamera
Definition:
RotateCamera.cs:4
Generated by
1.8.6