Vector3 currentCameraEulers;
float rotationDPI = 7f;
void Update()
{
float cameraX = Input.GetAxisRaw("Mouse X") * rotationDPI;
if (cameraX != 0f)
{
currentCameraEulers = new Vector3(0, cameraX, 0);
transform.eulerAngles += currentCameraEulers;
}
float cameraY = Input.GetAxisRaw("Mouse Y") * rotationDPI;
if (cameraY != 0f)
{
currentCameraEulers = new Vector3(cameraY, 0, 0);
transform.eulerAngles += currentCameraEulers;
}
}