When ever I move my mouse up the screen goes down. When I move my mouse down my screen goes up.
I would like it so that when I move my mouse down my screen goes down with it. If you could fix it that would be lovely. Thank You!
Here is the code:
var lookSensitivity : float = 5;
private var yRotation : float;
private var xRotation : float;
private var currentYRotation : float;
private var currentXRotation : float;
private var yRotationV : float;
private var xRotationV : float;
var lookSmoothDamp : float = 0.1;
function Update () {
yRotation += Input.GetAxis("Mouse X") * lookSensitivity;
xRotation += Input.GetAxis("Mouse Y") * lookSensitivity;
xRotation = Mathf.Clamp(xRotation,-90,90);
currentXRotation = Mathf.SmoothDamp(currentXRotation,xRotation,xRotationV,lookSmoothDamp);
currentYRotation = Mathf.SmoothDamp(currentYRotation,yRotation,yRotationV,lookSmoothDamp);
transform.rotation = Quaternion.Euler(currentXRotation,currentYRotation,0);
}