This document details the core classes of the Smart Flying Navigation plugin.

Actors

OctreeVoxelVolume

The OctreeVoxelVolume actor is responsible for managing the static collision data used for pathfinding. It bakes the environment into an octree structure.

Properties

Property Type Description
VoxelExtent float
The side length of the smallest individual voxel. It directly controls the granularity of the navigation grid. Smaller voxel extents allow for more precise pathfinding and better obstacle avoidance, especially for agents with small radii. Conversely, a larger voxel extent results in a coarser grid, which is more memory-efficient but may lead to less optimal paths or collisions with smaller details.
MapSize FIntVector
The overall dimensions (X, Y, Z) of the navigation volume. It defines the total area where pathfinding can occur. This setting, combined with Voxel Extent, determines the physical size of the navigable space. A larger map size covers a wider area but can also contribute to increased memory usage and baking time.
BakedOctreeData TSoftObjectPtr<UOctreeDataAsset>
Holds the pre-baked octree data for static geometry. This data is loaded at runtime to initialize the static collision information for pathfinding.
StaticObjectProfile UVoxelObstacleProfile*
Defines which actors are treated as static obstacles. This profile allows you to filter objects by their Collision Channel or Object Tags, giving you precise control over what is included in the baked navigation data. The profile can be configured to 'Match Any' (baking objects that meet any of the specified criteria) or 'Match And' (baking only objects that meet all specified criteria). If no profile is assigned, the system defaults to treating all objects with the WorldStatic collision object type as obstacles.
BakeExcludeActors TArray<AActor*>
(Editor-only) Actors to be ignored during baking. Any actors added to this list will be explicitly ignored during the octree baking process, preventing them from being considered static obstacles.

Components

PathfindingComponent

The core component responsible for calculating and following paths for a single agent.

Core Configuration

Property Type Description
TargetActor AActor* The actor that this agent will attempt to move towards. Its location is used as the pathfinding destination.
AcceptanceRadius float The distance from a waypoint or the final destination at which it is considered 'reached'. Prevents the agent from circling its target.

Agent Properties

Property Type Description
BaseAgentRadius float The agent's fundamental radius, assuming its scale is 1.0. The actual pathfinding radius is this value multiplied by the actor's scale.
AgentRadius float (Read-Only) The final, calculated radius used for pathfinding (BaseAgentRadius * Actor Scale).
AvoidanceRadius float The 'personal space' radius for real-time dynamic avoidance. For predictable results, it is recommended to set this value equal to the 'Pathfinding Radius (Scaled)'.

Movement

Property Type Description
MovementSpeed float The target speed (in UU/s) at which the agent moves along its calculated path.
RotationInterpSpeed float Controls how quickly the agent rotates to face its direction of travel. Higher values result in sharper turns.
MovementMode enum (Read-Only) Shows the current movement strategy (Spline or Linear). This is determined automatically by the component for optimal, safe movement.
PartialPointSplineNum int The number of future path points to use when generating the spline for smooth following.

Dynamic Pathfinding

Property Type Description
RepathCooldown float The time in seconds to wait between automatic path requests when bPeriodicRepath is enabled.

Debugging & Tools

Property Type Description
bDrawDebugPath bool If true, the agent's calculated path will be visualized in the world.
Duration float How long (in seconds) the debug path visualization persists in the viewport.
LineThickness float The thickness of the debug path lines.
BoxThickness float The thickness of the outline for the debug boxes at each waypoint.
BoxHalfSize float The size of the debug boxes drawn at each waypoint.
PathColor FColor The color of the debug path lines connecting waypoints.
PathPointColor FColor The color of the debug boxes at each waypoint.
CurrentState enum (Read-Only) Shows the agent's current high-level behavior (e.g., Idle, FollowPath).
CurrentTargetLocation FVector (Read-Only) The world location the agent is currently trying to reach.
FoundPath TArray<FVector> (Read-Only) The array of FVectors representing the waypoints of the current path.

Subsystems

AvoidanceSubsystem

These are the publicly exposed variables in UAvoidanceSubsystem, which are accessible in the Unreal Editor's Details panel and can be read/written in Blueprints.

Properties

Property Type Description
TimeHorizon float Defines how far into the future the avoidance system considers potential collisions.
MaxNeighbors int32 Specifies the maximum number of neighboring agents or obstacles considered for each agent during calculations.
GridCellSize float Defines the size of grid cells used for spatial partitioning, influencing obstacle detection granularity.
SymmetryBreakingRangeMultiplier float Introduces asymmetry to prevent agents from getting stuck in reciprocal oscillations.
SolverIterations int32 Determines the number of iterations the avoidance solver performs for optimal velocity calculation.
SideBiasMagnitude float Controls the strength of a bias encouraging agents to prefer passing on one side of an obstacle.
InterpSpeed float Controls how quickly an agent adjusts its current velocity towards the calculated optimal avoidance velocity.
bShowVelocityDebugLine bool When true, enables debug lines to visualize agent velocities.
bUseAvoidance bool When true, enables the avoidance system for agents.