Working on an isometric shooter, i thought my NPCs were fine but it turns out no. Whenever i hug up on a wall and leave when the NPC gets close, they hug up to the wall and think theyre above it and it messes with pathfinding. Anybody have any ideas on how to fix this?
(path visualizer is on here and you can see the yellow waypoints on top of that part and its trying to follow that path from the top of the part to me)
Hello Kantot, I’ve worked with pathfinding and usually, situations like this happen when the NPC assumes it can take a path it cannot.
My suggestion: add a transparent barrier to the top of your objects, so that your NPCs understand there is no way they can get up there. Also consider tweaking the maximum slope angle.
Yello! I suggest you add a pathfindingmodfier in all such parts where you don’t want the npc to go and just add a super high cost to it like math.huge. I hope this works.