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.
Hi, @Ryan got point, you are giving the start position, you should give the current position (which is the same as start position only at the start ) and apply that return value to current position.
You must also give the velocity parameter as reference so that the function can modify it and use the new velocity value next time.
And the 4th param should represent time as float. Something that won’t change.
Also execution order is not correct I think.
So it should be something like this : (c#)
void camStart() {
float smoothTime = 5.5f;
Vector3 camStartPosition = new Vector3 (11.5, 0, -5);
var camEndPosition = new Vector3 (0, 0, -5);
var velocity = new Vector3 (-5, 0, 0);
transform.position = camStartPosition;