Need Help with Enemy AI Not Working in Pacman Game

Godot Version

4.2.2

Question

Hi everyone,

I made sure to follow the rules I read on the tutorials and in the Godot 4.0 API about how the if blocks work and how the lines end with semicolons and how a vector has more than one coordinate, and all of those details, before just throwing things randomly and hoping something sticks, but unfortunately even after I followed the directions very precisely like a good coder the enemy still doesn’t turn correctly when it hits a wall in a Pacman clone I am making.

Can anyone please help me figure out what I am doing wrong? Thank you all in advance. :slight_smile:

Link to Game, called “Pizza Panic”

Does anyone have any responses on the solution to this problem?