Hi guys, does anyone know how to make pathfinding work in water terrain? (While npc is swimming or disabled swimming, either is fine). My Getwaypoints() seems to return an empty talbe when Target is in water, or when the NPC itself is in the water. Thanks!
COMMUNITY QUESTION
Why doesn't Pathfinding work in water?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

6 comments
I'm guessing the pathfinding service considers water as an obstacle. The empty table probably indicates that no path was found when you called the pathfinding service. Can you confirm this with path.Status?
However if you look at the navigation mesh as described in the link below, you see that the water shouldn't be the reason for your path failing. I don't know what the reason is, sorry! https://wiki.roblox.com/index.php?title=API:Class/PathfindingService
Actually i just discovered that it can still pathfind my character in water, but once the npc itself goes into the water, it can't move and sank to the bottom, then it reflects nil. Is it possible that my NPC can't swim hence resulting "nil"? If so are there any conditions i need to fulfill to make it swim? That's a self made NPC and it has alot of parts missing. (its a simple slime with 3 parts)
After disabling swim, my NPC was able to follow me in water, but once i left the water, it can't find the path anymore :/
Question. What happens if your start- or end-point is to far (high) from the ground.?
If the starting point is too high and the NPC is free falling, nil will be reflected. If the starting point is too low plus there's no viable path to navigate up, nil will be reflected. Just like how it's supposed to work. Both scenario won't be nil if there's a viable way towards the end.