vector.SmoothDampedVector

class vector.SmoothDampedVector(start: vector.Vector3, target: vector.Vector3, initial_velocity: vector.Vector3, smooth_time: float = 0.3, max_speed: float = inf)

Object that holds a vector and its rate of change, to smoothly move it towards a target over time.

current

current vector

target

target vector

velocity

the velocity of current

smooth_time

about the time it will take to reach target if it doesn’t move

max_speed

the maximum speed that velocity can reach

smooth_damp(delta_time: float) vector.Vector3

Returns the new value of current after moving it towards target smoothly.

delta_time is used to calculate the effect of velocity and how much it will change.

See https://docs.unity3d.com/ScriptReference/Vector3.SmoothDamp.html.