unity – How to use SmoothDamp with speed?

I have a moving platform which is being moved like this: Vector2 currentPosition = rigidBody2d.position; Vector2 movement = Vector2.MoveTowards(currentPosition, target, speed * Time.deltaTime); rigidBody2d.MovePosition(movement); velocity = (movement – currentPosition) /…