Collision doesnt get removed when I erase parts of the tilemap
Hello everyone!
I'm working on a 2D game, but I'm having some trouble when I use the Tilemap collider 2D. When I make a level it all works fine, but once I use the 'erase' function to edit a part of my level the collision of the removed tiles won't get removed. Because of that, I'm stuck with random spots that still have collision.
Resetting/removing and adding the Tilemap collider 2D doesn't seem to refresh the collision. How could I get rid of these invisible blocks?
Thanks in advance!
Bah - figured out my problem. I had an old runtime generated edge collider that was the culprit. It was created to be the same shape as the tilemap, but not visible.
Bump. I too am having this problem suddenly.
I have tiles that I remove at runtime. They are using a composite collider. I've tried without composite too. I swear it was working in the past.
$$anonymous$$y player just gets stuck where the tile was, but it does not show up in the editor or the game, and the collider gizmos show the correct green outline.
Answer by hjc_ · Sep 04, 2020 at 08:56 PM
For future readers, I was able to fix this by going to the Tilemap object in the grid that used to contain the tiles I deleted and toggling the Tilemap Collider on and off. This also updated all physics outlines I had manually changed.
Your answer
Follow this Question
Related Questions
Floating Sprite Unity 2018.1.2 1 Answer
2D tilemap item collision deletes all items? 1 Answer
How to destroy a tile on collision in several parts 0 Answers
Unity bug gives false error messages or doesen't work without a Debug.Log() line present 1 Answer
a chain of 2d collision problem ( object going trough other ) 0 Answers