iam learning fps tutorial.
My first script is the mouselookup script.
Problem is with a mathf script that i have used.
The script is as follows.
public class mouselookup_script : MonoBehaviour {
public float looksensitivity = 5;
public float yrotation;
public float xrotation;
public float currentxrotation;
public float currentyrotation;
public float YrotationV;
public float XrotationV;
public float looksmoothdamp;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
yrotation += Input.GetAxis("Mouse X") * looksensitivity;
xrotation -= Input.GetAxis("Mouse Y") * looksensitivity;
currentxrotation = Mathf.SmoothDamp( currentxrotation, xrotation, XrotationV, looksmoothdamp );
currentxrotation = Mathf.SmoothDamp( currentxrotation, xrotation, XrotationV, looksmoothdamp );
transform.rotation = Quaternion.Euler(currentxrotation, currentyrotation, 0);
}
}
The error message i received, when i ran the script is
Assets/scripts/mouselookup_script.cs(27,42): error CS1502: The best overloaded method match for `UnityEngine.Mathf.SmoothDamp(float, float, ref float, float)’ has some invalid arguments.
Need help.
Dont know wat is the problem.