Problem with collition

Hello there! I am having an issue with the collider on the platforms tilemap, I have already restarted the Tilemap collider 2d but Goober is still passing the border, what can I do to avoid the extra space on the Tilemap collider 2d?


Hi,

Welcome to our community! :slight_smile:

Thanks for sharing the screenshots. They are very helpful. The green line represents the tilemap collider. Actually, its shape is supposed to match the overall shape of the tilemap.

However, in your screenshot, there are lots of gaps. This indicates that there is a problem with the tilemap collider component. Disable and reenable it. If you are lucky, Unity recalculates the collider shape correctly.

Did this help you fix the problem?


See also:

Hello Nina!

I have already fixed the borders of the tilemap collider but Goober is still passing the border, what can I do?

Have you already analysed the situation? You could play your game and press the Pause button. Then click the third button to go from frame to frame. Maybe the enemy does flip in one frame but flips back in the next frame.

If that happens, take a closer look at the colliders in that situation. Maybe the enemy’s “back” touches the edge as well. And since we flip the enemy if its collider exists another collider (here: the edge collider of the tilemap), it might be that you will have to adjust the position and size of the enemy’s colliders a bit.

I have already solved it, the problem was that I activate the “Is Trigger” in another object

Thanks for your help!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms