So, I am programming a bot commander game. To make things fast, I am calculating only one path using the pathfinding service, from the average positions of all the bots to the target average positions. Doing it individually would be super slow, especially in bigger formations (I’ve tested it). This works 99% of the time, and will work 100% of the time on the map I’ll be using for this game (mostly an empty field with cosmetic buildings and such)
However, when I try and test it on irregular terrain, the path created is horrible. It gets wayyy too high to wayyy too low and causes my bots to freak out because they’re not 20 studs tall. I’ve thought of only moving to the waypoint X and Z positions but that could cause issues as well.
My question is, has anyone encountered this issue before, and what could be a possible solution? I won’t be creating my own algorithm for this, so please don’t recommend that. It’s not necessary.
For anyone curious, the agent parameters are default, so width 2, height 5, canjump true.
Edit: as you can see the navmesh is COMPLETELY broken:
I already read through that, and it is not my issue. I already am shooting a ray from the bot to the finish point, checking if they can directly walk to it, and the path is returning status as success.
I’ve worked with pathfinding service before, and I’ve never encountered an issue where the navmesh is messing up. This might be an engine bug of some sort. I posted here to ensure that it wasn’t my fault, but the more I look into this the less I think so.
Yeah like @RafaNum24 has said, through research I believe it’s a limitation of the path finding services. The only option seems to avoid it via map design or make a custom pathfinding system sadly unless there’s a trick I haven’t seen on a post somewhere to avoid it.
Sorry about the late response, I was eating breakfast. The simplification of the triangles might only be an issue with very hilly terrain. My map doesn’t really plan to have huge sudden hills like that, so I believe perhaps it will be fine. The little demo area was more of a stress test than an actual situation, but I think that this is still very silly. Here is a more realistic look at the terrain I might have: https://streamable.com/matx29
I thought of a decent solution, which is to simply raycast from a much higher waypoint position to a much lower one and adjust the waypoint positions so the Y height is correct. Although this can cause some inaccuracies, in my case it will work perfectly on terrain hills. Leaving this here for anyone else that checks out this thread.