New answers tagged

0

The @DMGregory's comment is what I was looking for. I just take the character colliders and run for each one of them the call: foreach(var characterPartCollider in characterPartsColliders) { Physics2D.IgnoreCollision(groundCollider, characterPartCollider); } This makes the character fall down through a platform. Then when I detect a collision with ...


0

Solved it by checking if the button is up AND the y velocity is more than zero. Basically the velocity code will not be executed when the character is falling. Here is the code snippet: if (Input.GetButtonUp("Jump") && rb.velocity.y > 0) { isJumping = false; rb.velocity = new Vector2(rb.velocity.x, 0f); }


Top 50 recent answers are included