3dRaven
(3dRaven)
October 26, 2024, 12:57pm
17
Try in NavigationSystem.h
NAVIGATIONSYSTEM_API uint32 FindPathAsync(const FNavAgentProperties& AgentProperties, FPathFindingQuery Query, const FNavPathQueryDelegate& ResultDelegate, EPathFindingMode::Type Mode = EPathFindingMode::Regular);
Here is a thread that mentions some extra steps for it.
I created a custom AI MoveTo node that uses the Async Path request instead of sync path requests. My current flow for using it is as follows:
ExecuteTask is called and I call the function FindPathAsync to receive a uint32 handle for the query result and store the result in the node memory block (non-instanced C++ native Task node)
In TickTask, I check each frame to see when the Async path is formed
In TickTask, if a query is pending and the uint32 handle is valid, I collect the NavPathSharedP…
I’m sure there are also tutorials that mention it.
Other option is to write your own function with FRunnable and implement A* on the vertices of the nav mesh (would need extra work to add modifiers though).
1 Like