Quantcast
Channel: Questions in topic: "issue"
Viewing all articles
Browse latest Browse all 827

When using NavMeshQuery and the rest of the experimental Pathfinding for long paths the GetPortalPointsOperation fails

$
0
0
Hi there, Some context: I've recently abandoned the regular navigation as there is a hard limitation for how much nodes it can explore and I was surpassing it, I [opened a topic about it on the forums][1] and @snacktime suggested me using the new Experimental navigation. Now I'm using the new Navigation tools from [UnityEngine.Experimental.AI][2] and I might have found an issue, but since I'm unsure whether it's on my end or on theirs I figured I'll ask it here first to see if someone knows about it. I have a test scene with a fairly complex navigation mesh (while it's highly connected it has a lot of nodes and paths tend to have lots of points, it also has a large feature in the middle that is designed to work as a sort of dead end where pathfinding usually has trouble). When resolving paths on this mesh I need to give a really large number of nodes (1M, I tried with 100K and it runs out of nodes for long paths). With the above considerations, the NavMeshQuerry works for short, long and really long paths, no problem. But after the querry ends you get a NativeArray of PolygonId and need to process it to get the actual path; for this I'm using the code they used for [the Nordeus Demo in Austin][3] and call the FindStraightPath method. This works for short and medium paths but when you start to get to really long paths one of the GetPortalPoints operation it performs along the way fails. It doesn't fail at the beginning or right at the end, it seems to be failing mid-way through the path. The max length isn't consistent either, it depends on the Start/End Position, but once a point starts to fail it'll always fail (and continue to fail when you move it further away). ---------- ![alt text][4] - The top point is the destination, same in both cases. - The red point on the left is a long path that is valid. - The red point on the right is a path where the "GetPortaiPoints" at failed midway. As you can see both pathfinding requests follow the same path until one fails at a seemingly random spot (and then goes to (0,0,0)). Does anyone have any insight on why this might be happening? Am I missing something obvious? Is there some bug on the PathUtils.cs code from the demo? Have a nice day and thanks for the help! [1]: https://forum.unity.com/threads/navmesh-is-unable-to-calculate-a-path-from-a-to-b-and-no-one-seems-bothered-by-it.769784/ [2]: https://docs.unity3d.com/ScriptReference/Experimental.AI.NavMeshQuery.html [3]: https://github.com/Unity-Technologies/UniteAustinTechnicalPresentation/blob/master/StressTesting/Assets/Scripts/Utils/PathUtils.cs [4]: /storage/temp/148365-pathcompare.png

Viewing all articles
Browse latest Browse all 827

Trending Articles