Hi!
I’m having a bit of trouble with making Goober flip directions. He’s willing to do it on the left side of the platform (where there is no wall) but refuses to flip on the right side, where there is a wall.
If I understand this correctly the Platforms Tilemap (which has the ground and the walls) has a Tilemap Collider 2D and is on the layer called ‘Ground’.
Goober has a Box Collider 2D, which I’ve placed a bit further to the right to make it more clear, that passes the red line (which is the collider line, right?). The Box Collider 2D starts on the collider, because it passes through the ground, Goober moves to the right, it passes through the wall collider and suddenly is not touching any of the colliders. Goober should turn left, but doesn’t do this, instead he runs right through the wall.
Goober runs inside of the wall, the boxcollider passes through to tilemap collider on the right side of the wall and Goober flips arond.
What am I doing wrong?
I’ve copy/pasted the script, to make sure it is right, but I can’t seem to figure this one out.