Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

when I jumped onto a floating platform above me, I got bugged and couldn't jump. 

Sometimes when you are on the floor the ground detector does not always work. Personally, in Unity instead of void OnCollisionEnter2D(Collider2D other) I prefer something more like this:

    [Header("Layers")]
    public LayerMask groundLayer; //the layer u are using for the ground
    private bool isGrounded;
    void HandleCollisions()
    {
        Vector2 position = new Vector2(transform.position.x, transform.position.y - 0.18f); //collider position
        isGrounded = Physics2D.OverlapCircle(position, 0.2f, groundLayer); //ground detection
    }

then you will see if you are on the ground with isGrounded like:

if (jumpInput && isGrounded)
{
}

I don't know if you are using oncollisionenter2d but i hope that helps u^^

well we actully used OverlapBox

it shouldve worked in theory but again thanks for actully giving uc advice 

Well so the collision is probably either too high or too low. Its the only thing I think