Navigation
API > API/Runtime > API/Runtime/AIModule
FMetaNavMeshPath allows creating hierarchical or guided navmesh paths
Waypoints array defines list of locations that will be used to create actual FNavMeshPath data during path following. On path following start and upon reaching waypoint, path will request update from owning navmesh with following parameters:
- start location set to agent location
- end location set to target waypoint (or goal actor for last one)
- goal actor set only for last section
Since path updates itself for moving agent it really shouldn't be reused by others.
| Name | FMetaNavMeshPath |
| Type | struct |
| Header File | /Engine/Source/Runtime/AIModule/Classes/Navigation/MetaNavMeshPath.h |
| Include Path | #include "Navigation/MetaNavMeshPath.h" |
Syntax
struct FMetaNavMeshPath : public FNavMeshPath
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → FNavigationPath → FNavMeshPath → FMetaNavMeshPath
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMetaNavMeshPath
(
const TArray< FVector >& InWaypoints, |
Navigation/MetaNavMeshPath.h | ||
FMetaNavMeshPath
(
const TArray< FVector >& InWaypoints, |
Navigation/MetaNavMeshPath.h | ||
FMetaNavMeshPath
(
const TArray< FMetaPathWayPoint >& InWaypoints, |
Navigation/MetaNavMeshPath.h | ||
FMetaNavMeshPath
(
const TArray< FMetaPathWayPoint >& InWaypoints, |
Navigation/MetaNavMeshPath.h | ||
| Navigation/MetaNavMeshPath.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| Super | FNavMeshPath | Navigation/MetaNavMeshPath.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| Type | const FNavPathType | Navigation/MetaNavMeshPath.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool ConditionalMoveToNextSection
(
const FVector& AgentLocation, |
Try switching to next waypoint, depends on WaypointSwitchRadius | Navigation/MetaNavMeshPath.h | |
virtual void CopyFrom
(
const FMetaNavMeshPath& Other |
Copy properties of other meta path | Navigation/MetaNavMeshPath.h | |
bool ForceMoveToNextSection
(
const FVector& AgentLocation |
Force switching to next waypoint | Navigation/MetaNavMeshPath.h | |
AActor * GetMetaPathGoal() |
Returns cached path goal | Navigation/MetaNavMeshPath.h | |
int32 GetNumWaypoints() |
Returns number of waypoints | Navigation/MetaNavMeshPath.h | |
int32 GetTargetWaypointIndex() |
Returns index of current target waypoint | Navigation/MetaNavMeshPath.h | |
const TArray< FMetaPathWayPoint > & GetWaypointArray() |
Returns waypoint array | Navigation/MetaNavMeshPath.h | |
float GetWaypointSwitchRadius() |
Returns radius for switching to next waypoint during path following | Navigation/MetaNavMeshPath.h | |
virtual void Initialize
(
const FVector& AgentLocation |
Initialize path for path following | Navigation/MetaNavMeshPath.h | |
bool IsLastSection() |
Returns true if path at last waypoint | Navigation/MetaNavMeshPath.h | |
bool SetWaypoints
(
const TArray< FMetaPathWayPoint >& InWaypoints |
Tries to set waypoints, fails when path is ready being followed | Navigation/MetaNavMeshPath.h | |
bool SetWaypoints
(
const TArray< FVector >& InWaypoints |
Tries to set waypoints, fails when path is ready being followed | Navigation/MetaNavMeshPath.h | |
void SetWaypointSwitchRadius
(
float InSwitchRadius |
Sets radius for switching to next waypoint during path following | Navigation/MetaNavMeshPath.h | |
virtual bool UpdatePath
(
const FVector& AgentLocation |
Updates underlying navmesh path for current target waypoint | Navigation/MetaNavMeshPath.h |
Overridden from FNavigationPath
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void DebugDraw
(
const ANavigationData* NavData, |
Navigation/MetaNavMeshPath.h | ||
virtual void DescribeSelfToVisLog
(
FVisualLogEntry* Snapshot |
Navigation/MetaNavMeshPath.h | ||
virtual FVector::FReal GetCostFromIndex
(
int32 PathPointIndex |
Returns approximate cost of path, ignores parameter | Navigation/MetaNavMeshPath.h | |
virtual FVector::FReal GetLengthFromPosition
(
FVector SegmentStart, |
Returns approximate length of path, ignores parameters | Navigation/MetaNavMeshPath.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool MoveToNextSection
(
const FVector& AgentLocation |
Switch to next waypoint | Navigation/MetaNavMeshPath.h |