Dynamic
allows for procedural levels,
or a manually triggered rebuild.
However, constantly moving objects (such as moving platforms) as blocking meshes
are not supported, nor are blocking rigid bodies.
Please see here for more
details.
Spawn Nav Data in Nav Bounds Level
setting in
Project Settings means different navigation data can be serialised to different
sublevels and manually loaded as required.
uint32 FindPathAsync(UNavigationSystemV1* NavSys, const FNavAgentProperties& AgentProperties, FPathFindingQuery Query, const FNavPathQueryDelegate& ResultDelegate, EPathFindingMode::Type Mode = EPathFindingMode::Regular);
in UFlyingNavFunctionLibrary
. From Blueprints you can use the
Find Path To Actor/Location Asynchronously
nodes.
UNavigationSystemV1::FindPathAsync
, as it can cause a crash on PIE
exit.
MoveTo
performs
pathfinding synchronously, so optimisations are recommended for complex scenes
if you are using behaviour trees.
DebugDraw
functions and will
therefore scale very well.
DebugDraw
functions, and should not be used for high resolution octrees.AFlyingNavigationData
in C++ (one per agent type), the requirement
for different agent radii and heights can be mitigated.
UNavigationSystemV1::GetNavDataForProps
, and is the source of many headaches when working with multiple agents.
It's worth becoming familiar with this function if you're having issues with multiple agents.
MoveTo
or a behaviour tree does this for you, but for
the FindPath*
nodes you need to use the Request Move
node.
Preferred Nav Data
set to
Flying Navigation Data
.
Supported Agents Mask
, in both Project Settings and World
Settings (under
World/Navigation System Config/Supported Agents Mask
)
Nav Mesh Bounds Volume
in the world.There are 3 options which affect a mesh's blocking status. In order for a mesh to be blocking, it must have these options:
Collision/Can Ever Affect Navigation = true
Physics/Simulate Physics = false
Navigation/Is Dynamic Obstacle = false
in the Static Mesh
asset settings.
Conversely, toggling any of these settings will make the mesh non-blocking.
In most cases the best option is setting
Collision/Can Ever Affect Navigation = false
on the Static Mesh
spawned or placed in a level.
The Is Dynamic Obstacle
option impacts all instances of that
Static Mesh, and so could be useful for always non-blocking meshes.
And obviously Simulate Physics = true
is a simulated rigid
body.
A reload may be required before building the navigation for the changes to
take effect.
Assertion failed: InNodeIndex < (1 << 22)
This means you have pushed the Max Detail Size too far, and the node index
parameter has overflowed.
To fit nodes compactly, unique identifiers need to fit into a 32 bit
integer,
22 bits of which are reserved for the node index in a given layer.
The number of nodes in a layer has exceeded 2^22 = 4,194,304
,
and you should really increase that Max Detail Size.
We can pretty much guarantee that you don't need it that low, but if you
think you do open an issue on GitHub and we'll see what we can do.
unresolved external symbol "__declspec(dllimport) public: bool __cdecl FSVOLink::IsValid(void)const " (__imp_?IsValid@FSVOLink@@QEBA_NXZ) referenced in function "public: enum ENavigationQueryResult::Type __cdecl FSVOPathfindingGraph::FindPath(struct FVector const &,struct FVector const &,struct FSVOQuerySettings const &,class TArray<struct FNavPathPoint,class TSizedDefaultAllocator<32> > &,bool &)" (?FindPath@FSVOPathfindingGraph@@QEAA?AW4Type@ENavigationQueryResult@@AEBUFVector@@0AEBUFSVOQuerySettings@@AEAV?$TArray@UFNavPathPoint@@V?$TSizedDefaultAllocator@$0CA@@@@@AEA_N@Z)
If you wish to access the plugin C++ API, you will need to link against
FlyingNavSystem
. You will also need to link against the
NavigationSystem
module if you call parts of the built in
Navigation System.
In your project .Build.cs
file, you should have:
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "NavigationSystem", "FlyingNavSystem"});
For example, in the benchmark project I use
FNavigationQueryFilter
to perform a path query, which requires
linking to NavigationSystem
.
When using a Pawn as a pathfinding goal, it is a good idea to set the
Base Eye Height
to zero.
Otherwise, the pathfinding algorithm will use the bottom (or ‘feet’) of the
Pawn as the goal location, rather than the centre.
The feet are more likely to be inside a blocked area.
Note: This does not apply to Characters, which unfortunately uses a
hardcoded CapsuleComponent->Bounds.BoxExtent.Z
offset for the
feet.
Using a sphere primitive as the simple collision on a mesh can sometimes be
inaccurate, as the builtin geometry gathering code converts it to a low-res
triangle approximation.
This can mean bits of spheres poke out of the voxels, but this can be
rectified with the Use Agent Radius
checkbox under the advanced
Generation
options.
If "Data Gathering Mode" is set to "Lazy" and "Generate Navigation Only Around Navigation Invokers" is turned on, the landscape geometry is not available on every thread. Therefore, only some octants have access to that data. The current workaround is to set Data Gathering Mode to "Instant" and reload the level. This only needs to be done at build time, so it can be changed back to "Lazy" for production.
If you're still having problems, please don't hesitate to open an issue on GitHub or have a chat on the Discord.