I am trying to make a 2D sprite bounce like jelly using DoTween’s DOShakeScale. I put DoShakeScale inside OnCollisionEnter2D so that my bouncing sprite could shake scale like some jelly block. But the scale does not revert when the bouncing stops. Is it possible to revert an object’s scale to its original after a doShakeScale ?
Edited:
the script reference is just the Collision detection.
void OnCollisionEnter2D(Collision2D other)
{
transform.DOShakeScale(0.1f, new Vector3(0.4f,0.3f,0f),0,0f,false);
}