TileVania 95: Move and flip enemy, not flipping

Hi MaartenvW,

Welcome to our community! :slight_smile:

Thank you for sharing screenshots of the problem. That’s helpful. From what I see, Goober’s colliders seem to be correct. They are often the reason for this problem but, apparently, not in your case.

Another typical mistake is that the children of the parent game object (Goober) have got a significant offset. Please select the parent. While your game is not running, set the x-scale to -1, and then to 1 to see if you are able to recreate the problem.

If you are able to recreate the problem, click on the children. Their position in the Inspector is the local position relative to their parent. Ideally, there should not be any offset, so their position should be set to (0, 0, 0).

If you need an offset, place Goober right next to a wall and manually flip it by setting the scale to -1 and 1 respectively. Goober must not teleport but flip around its y-axis. Make sure that it does not end up inside the wall or on the edge collider when flipping. Otherwise, you’ll end up with a Goober constantly flipping around, or with the problem you are currently experiencing.

Did this help?


See also: