#Enemy gets occasionaly stuck while pathfinding

1 messages · Page 1 of 1 (latest)

hoary tide
#

Im new to Godot, and rusty at programming, but I have the start to a Pacman clone I am making to practice. Im using a tilesetlayer, with a NavigationLayer. Sometimes the enemy gets stuck on walls because its not following the drawn out path(using debug). Can someone take a look at this code and help me out 🙂
(Also unsure how to post it, so I put a filemail download for the entire project file)
https://www.filemail.com/d/iwqkmocpqujnybz

wind gorge
#

can you post a video of what happens?

hoary tide
hoary tide
wind gorge
#

thanks! figured i'd download the project to see what i see

#

ok, here's what i think is happening: the path desired distance for the navigation agent that the ghost uses is too high, so when the ghost gets to a tight corner, it thinks it has already gotten around the corner and heads for the next point along the path. i set both it and target desired distance to 10 px and it worked like a charm for me

hoary tide
#

Oh wow thanks. I played around a lot with those values, I think I even tried 10px. But Ill try it and see if it works. You didnt change any other values right?

wind gorge
#

i just changed those two desired distances to 10px each

#

lmk if it works!

hoary tide
#

It works great now thanks so much