SmoothDamp velocity adjust?

silly question i think…

how do i adjust the individual vector3 variables for velocity?

 transform.position = Vector3.SmoothDamp(transform.position, objectToFollow.transform.position, ref velocity, smoothTime);

ive tried a number of things and keep getting errors

cheers

You don’t adjust the individual vector3 components for velocity. You just declare the variable:

private Vector3 velocity = Vector3.zero;

…then this variable is passed in the SmoothDamp method as a reference parameter, which means that this variable is assigned a value inside the SmoothDamp method. So, after you call the SmoothDamp method, the velocity variable will hold the newly assigned value, which you can use, as needed.