GODOT VERSION: v4.2.stable.official [46dc27791]
I'm trying to have an enemy face the player when the player enters its detection box. But I’m having trouble with it. The enemy doesn't always face the player (particularly when I'm trying to get it to face right after facing left).
Can anyone help me figure out what I’m doing wrong or link me to an answer for reference? I’ve looked around but couldn’t find anything.
- Here’s my code: https://pastebin.com/wCfGNGm4
- My scene tree is provided in the image.
- Here's a video of my issue: https://drive.google.com/file/d/1AU7MgS_wR0W0eOIBV5YD3PKUH9QLBi-6/view?usp=sharing