Hey, I'm trying to simply translate the camera from one position to the next. I'm getting the error;> Assets/Scripts/InGameGUI.js(471,46): BCE0023: No appropriate version of 'UnityEngine.Mathf.SmoothDamp' for the argument list '(UnityEngine.Vector3, UnityEngine.Vector3, float)' was found.
However from my end, the code looks sound.
Anyone have any ideas of what I've missed?
function CameraStart ()
{
var camStartPosition = Vector3 (11.5, 0, -5);
var camEndPosition = Vector3 (0, 0, -5);
transform.position = camStartPosition;
var getCamSpeed : int = 0;
getCamSpeed = camSpeed;
getClock.GetComponent(clock).playTimeEnabled = false;
camSpeed = 1.0;
yield WaitForSeconds (7);
transform.position = Mathf.SmoothDamp(camStartPosition, camEndPosition, camSpeed * Time.deltaTime);
//moveCamCenter = true;
yield WaitForSeconds (5.5);
getClock.GetComponent(clock).playTimeEnabled = true;
camSpeed = getCamSpeed;
}
↧