@@ -18,10 +18,10 @@ namespace Camera
|
||||
{
|
||||
var mouseX = Input.GetAxis("Mouse X") * mouseSensitivity * Time.deltaTime;
|
||||
var mouseY = Input.GetAxis("Mouse Y") * mouseSensitivity * Time.deltaTime;
|
||||
|
||||
|
||||
_xRotation -= mouseY;
|
||||
_xRotation = Mathf.Clamp(_xRotation, -90f, 90f);
|
||||
|
||||
|
||||
transform.localRotation = Quaternion.Euler(_xRotation, 0f, 0f);
|
||||
playerBody.Rotate(Vector3.up * mouseX);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user