using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Camera_Controll : MonoBehaviour
{
public Transform Player;
private float mouseX, mouseY;
public float sensivity = 200f;
private void Start()
{
Cursor.lockState = CursorLockMode.Locked;
}
void FixedUpdate()
{
mouseX = Input.GetAxis("Mouse X") * sensivity * Time.fixedDeltaTime;
mouseY = Input.GetAxis("Mouse Y") * sensivity * Time.fixedDeltaTime;
mouseY = Mathf.Clamp(mouseY, -90, 90);//И чё мы не работаем?
//Поворот персонажа
Player.Rotate(mouseX * new Vector3(0, 1, 0));
transform.Rotate(-mouseY * new Vector3(1, 0, 0));
}
}