4
\$\begingroup\$

I am looking how to make a bouncing effect with DOTween, like when the object is attached to a spring. How can I make an effect like this?

\$\endgroup\$

1 Answer 1

4
\$\begingroup\$

As it was not clear to me in the documentation I am exposing the answer here:

You can use

DOShakePosition(float duration, float/Vector3 strength, int vibrato, float randomness, bool snapping, bool fadeOut)

Shakes a Transform's localPosition with the given values.

This configuration worked for me:

transform.DOShakePosition(2.0f, strength: new Vector3(0, 2, 0), vibrato: 5, randomness: 1, snapping: false, fadeOut: true);

Result:

enter image description here

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .