Here is the code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerPOV : MonoBehaviour {
float camSens = 0.25f;
private Vector3 lastMouse = new Vector3(255, 255, 255);
void Update()
{
lastMouse = Input.mousePosition - lastMouse;
lastMouse = new Vector3(0, lastMouse.x * camSens, 0);
lastMouse = new Vector3(transform.eulerAngles.x + lastMouse.x, transform.eulerAngles.y + lastMouse.y, 0);
transform.eulerAngles = lastMouse;
lastMouse = Input.mousePosition;
}
}
I’m not sure about the view being inverted, but I am fairly certain that the character becoming distorted when looking around is because it is scaled differently in different directions. I am not entirely sure about this, but I encountered something similar when a child gameObject was rotating and the parent gameObject was scaled. The scale appeared to be applied to the child gameObject after it was rotated, but in relation to the parent gameObject. So if you try changing all the scale values to be the same, that might resolve the issue you are having.
I hope this helps! Sorry if I am wrong because I haven’t tested this myself fully.