Goober is fliping from where the ground tilemap ends(fig1&fig2).
I am facing two problems here;
- goober is going in the walls and fliping from the last ground tile(fig3&fig4).
- after fliping and coming outside of groung tiles, it again gets fliped and goes to walls(fig5).