Skip to content

Instantly share code, notes, and snippets.

@irfanbaysal
Created March 8, 2023 08:11
Show Gist options
  • Save irfanbaysal/630da551d7e4d1f8e196677613493dfd to your computer and use it in GitHub Desktop.
Save irfanbaysal/630da551d7e4d1f8e196677613493dfd to your computer and use it in GitHub Desktop.
HeartBeat effect with DOTween
private void PerformHeartBeatEffect(Transform targetTransform)
{
Sequence sequence = DOTween.Sequence();
sequence.PrependInterval(3f)
.Append(targetTransform.DOPunchScale(.15f * Vector3.one, .5f, 2, 0))
.Append(targetTransform.DOPunchScale(.15f * Vector3.one, .5f, 2, 0)).SetEase(Ease.OutBack).SetLoops(-1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment