I’m working on an 2D endless run, when my character jumps to get the special item, I freeze my character using:
character.rb.bodyType = RigidbodyType2D.Static; character.IsMoving = false; character.currentAnimator.speed = 0;
then I play effect animation.
After the effect finish, I release my character:
character.rb.bodyType = RigidbodyType2D.Dynamic; character.IsMoving = true; character.currentAnimator.speed = 1;
But when I do this, my character instead of getting higher to original height, he falls.
Is there any way to solve this? Please teach me. Thanks in advanced.