- Home /
How to check collision on tilemap.
So I want to check collision whenever player collide with tilemap which is specifically walls. I use OnCollisionEnter2D, Debug.Log to check it and it's not working. There is no collision between player and walls. I also put the wall rigidbody2D to static since this is a 2D game and I don't want the walls to fall down. A little help here would be great!
Answer by MUG806 · Feb 20, 2021 at 11:15 PM
Do you have a TilemapCollider attached to the tilemap? You probably also want to remove the rigidbody2D from the walls, if you dont want them to move. Rigidbodies should only be used for objects you want to move.
Your answer
Follow this Question
Related Questions
Unity 2D TileMap Rule Tile Carpet 1 Answer
Is making a 2d tile based game all in UI a bad solution or is it viable? 1 Answer
Find Tilemap Player is Currently At 0 Answers
tile palette offset tiles stacking not lining up 0 Answers
Why does this piece of code work with gravity and this one dosent 2 Answers