My GooberEnemy is going in the walls

Goober is fliping from where the ground tilemap ends(fig1&fig2).
I am facing two problems here;

  1. goober is going in the walls and fliping from the last ground tile(fig3&fig4).
  2. after fliping and coming outside of groung tiles, it again gets fliped and goes to walls(fig5).







    image

Hi Ayush,

Welcome to our community! :slight_smile:

Have you already checked the shape of the platform collider? Maybe there is something wrong with it.

are you saying about tilemap collidor 2d in platform tilemap?

Your last screenshot shows exactly what I meant: the tilemap collider. And it also shows the problem: There is no overall shape but squares.

In the TilemapCollider2D component, tick ‘Used By Composite’. That should hopefully fix it. If nothing happens, disable the TilemapCollider2D component, and reenable it again to make Unity recalculate the collider shape.

Did this fix it?


See also:

Thankyou Nina, it fixed my problem.

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

Privacy & Terms