I’m building a simple platformer, but am experiencing some odd collision behavior. My player character carries a boxcollider2d and a rigidbody 2d. The player is jumping onto a block carrying a boxcolllider2d. If I land on the top or bottom of the block the collision functions appropriately, but when the player hits the side of the block it passes right through it. This occurs despite the contact with the appropriate collider registering in the inspector. I would greatly appreciate any suggestions.
- Check whether the BoxCollider2D is covering the image of player and block properly in the scene view . and if not adjust the size in the boxCollider2D Component in the inspector
- Make the Rigidbody2D component’s Collision Detection to Continuous.
- If the problem persist add a rigidbody2D to the block also and make it static/kinematic based on your need.