Does anyone know whats wrong with this script (for the video Im following: http://www.youtube.com/watch?v=3JsuldsGuNw&list=PL7AE076AFAFD3C305)
the errors I’m getting are unknown identifier yRotationV and expressions in statements must only be executed for their side effects
var lookSensitivity : float = 5;
@HideInInspector
var yRotation : float;
@HideInInspector
var xRotation : float;
@HideInInspector
var currentYRotation : float;
@HideInInspector
var currentXRotation : float;
@HideInInspector
var yRoationV : float;
@HideInInspector
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);
}