Move Object for A to B with bounce effect


I was wondering if there is a way to move object from a to b with a bounce effect.

For example, similar to the right part of this video:


Evaluating an AnimationCurve for the transform would work. Though, getting the bounce effect to look right might take some time.

public AnimationCurve curve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f);
float elapsed = 0f;

// Update is called once per frame
void Update () {
	transform.localScale = * curve.Evaluate(elapsed);
	elapsed += Time.deltaTime;

A better solution might be to use an existing tween asset, such as DOTween. It already has ease types that can simulate bounces.


you can do it with two parent objects. one is for moving another is for bouncing