Lemo
Lemo

Reputation: 1

Problems with the BoxCollider2D and Pivot

I make a 2D game in Unity. I have a player with BoxCollider2D and Objects with BoxCollider2D and the player can't go through these Objects like it should but when the player walks from down to the top (topdown PixelRPG) Than he got blocked very early. I will try to show it in the pictures. I tried to change the size of the colliders the layers and more but can't find a solution. ProblemCollision2DChest Collision2DNPC Collision2DWindow

NoProblem

NoProblemswithObjects

ProblemAgainfromdowntoTop

Upvotes: 0

Views: 520

Answers (1)

rob
rob

Reputation: 123

From my experience, it looks like you simply need to resize your BoxCollider2D to fit the player.

Ways to change BoxCollider2D size

You can either use the Edit Collider button, and in the Unity viewport you can click and drag to change the size of the collider, or change the Size value in the inspector. Since your collider seems to be too large vertically, change the Y value to be smaller.

Upvotes: 1

Related Questions