First, let me just say that the A* Pathfinding project is awesome!
I’m having issues where the RichAI component is not working well for compact staircase situations. The actual path A* finds is valid, but the approximation that the RichAI component does to find the sensible/ smooth path is not working well and causes the characters to get stuck, or fall down the stairs.
Thanks for any help or advice. I’m thinking of modifying the RichAi to take less of an averaged smoothed path when the change in y for a path section is greater than the change in x and z.
I’ve recorded a small video demonstrating this behavior:
what type of graph are you using? are you running any modifiers on the path?
the first thing i’d do to troubleshoot is to remove any type of path smoothing to see if the enemy successfully draws a path up all the stairs. if that still catastrophically fails, perhaps exploring the use of a point graph would be ideal.
It’s a recast graph, and there are no modifiers. Yes, the path, which can be seen in the video as the green debug lines is successful. The smoothed path, blue line that RichAI creates, is not. Just lerping between the points works.
I’ve sent you a reproduction project via gmail. Oddly enough, it looks like the issue could be related to custom Recast Graph bounds. I only was able to reproduce the issue when I set a custom bounds, rather than using the snap bounds feature.
I checked the scene. It looks like this is caused by a navmesh with too small margins.
When the stair turns there are two triangles that line up exactly when seen from above, but they differ in y coordinate. However since they line up on one vertex the system cannot really decide if they should be connected or not. In this case it does decide they should be connected and thus we get this odd behaviour.