Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

question about 2D games

So i was making a simple 2D game. I added a 2D boxcollider to an emptyobject to create a border so my character wont go outside the scene, but as soon as player collides with the emptyobject's collider, player's collider gets disabled and it falls though the ground.

Another problem that occurs, is that when going through areas between lower terrains and the ground plane, i discovered that the boxcollider2D of the player constantly turns on and off by itself, making the player flicker in these areas, but the area formed by the boxcolliders of ground and terrain arent too small for the player's collider, why is this happening?


Best Answers

  • ComradePinguComradePingu Member
    edited July 21 Accepted Answer

    Did you put the collider of the player in the coruch disable collider slot? If yes, then remove it, I think that causes the problem

  • ComradePinguComradePingu Member
    edited July 22 Accepted Answer

    Make 2 separate colliders: one on the top half and one on the lower half, and disable the top one when you crouch. The top one can be a simple box collider, and the bottom one a capsule, in this way it will not be bigger, than the sprite

Answers

Sign In or Register to comment.