void Jump(Vector2 heroPos) { Vector2 targetPos = transform.position.ToVec2() + new Vector2(0, firstJumpHeight); Vector2 thisToHero = heroPos - targetPos; transform.rotation = Quaternion.FromToRotation(Vector3.down, thisToHero); Vector2 nextHeroPos = heroPos; rigidBody .DOMoveY(firstJumpHeight, firstJumpDuration) .SetRelative() .SetEase(firstJumpEase) .onComplete += () => { DOVirtual.DelayedCall(firstJumpToAttack, () => Attack(nextHeroPos)); }; DOVirtual.DelayedCall(lookAtHeroDelay, () => { nextHeroPos = HeroDefiner.CurrentPos.ToVec2(); Vector2 thisToHeroFinal = nextHeroPos - targetPos; float targetRot = Quaternion.FromToRotation(Vector3.down, thisToHeroFinal).eulerAngles.z; rigidBody.DOMyRotate(targetRot, lookAtHeroDuration, false).SetEase(Ease.InOutSine); }); }