Horje
free unity mouse look Code Example
free unity mouse look
public float lookSpeed = 3;
private Vector2 rotation = Vector2.zero;
public void Look() // Look rotation (UP down is Camera) (Left right is Transform rotation)
    {
        rotation.y += Input.GetAxis("Mouse X");
        rotation.x += -Input.GetAxis("Mouse Y");
        rotation.x = Mathf.Clamp(rotation.x, -15f, 15f);
        transform.eulerAngles = new Vector2(0,rotation.y) * lookSpeed;
        Camera.main.transform.localRotation = Quaternion.Euler(rotation.x * lookSpeed, 0, 0);
    }




Csharp

Related
how to get executable path in wpf Code Example how to get executable path in wpf Code Example
how to change rotate with script unity Code Example how to change rotate with script unity Code Example
pass parameter to thread c# Code Example pass parameter to thread c# Code Example
unity json save array Code Example unity json save array Code Example
c# random generator Code Example c# random generator Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9