AgentHeight
AgentHeight
#Overview
name: AgentHeight
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 36
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of AgentHeight is to define the height of the navigation agent (such as a character or AI) that will use the navigation mesh for pathfinding. This variable is crucial for the NavMesh generation process in Unreal Engine 5’s navigation system.
AgentHeight is primarily used in the following Unreal Engine subsystems and modules:
- Navigation System
- AI Navigation
- NavMesh Generation
- Smart Objects Module
The value of AgentHeight is typically set in the following ways:
- In the ARecastNavMesh class, it’s defined as an UPROPERTY, allowing it to be set in the editor or through blueprints.
- It can be updated programmatically through various functions like SetConfig, UpdateGenerationProperties, and ConfigureBuildProperties.
- It’s often derived from the character’s capsule component height in the NavMovementComponent.
AgentHeight interacts with several other variables, including:
- AgentRadius: Defines the radius of the agent.
- AgentMaxStepHeight: Determines the maximum height the agent can step up.
- CellHeight: Used in NavMesh generation to define the vertical resolution of the mesh.
Developers should be aware of the following when using AgentHeight:
- It directly affects NavMesh generation and pathfinding calculations.
- Changing AgentHeight may require regenerating the NavMesh for changes to take effect.
- It should be set to accurately represent the tallest agent that will use the NavMesh.
Best practices when using AgentHeight include:
- Set it slightly higher than the actual character height to account for animations or attached objects.
- Ensure it’s consistent with the character’s capsule component height.
- Consider using different NavMesh instances for significantly different agent sizes in your game.
- Regularly validate that AgentHeight is appropriate for all characters using the NavMesh.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:2823, section: [/Script/NavigationSystem.RecastNavMesh]
- INI Section:
/Script/NavigationSystem.RecastNavMesh
- Raw value:
144.f
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Runtime/SmartObjects/Source/SmartObjectsModule/Private/SmartObjectTypes.cpp:87
Scope (from outer to inner):
file
function bool FSmartObjectSlotValidationParams::GetUserCapsuleForActor
Source code excerpt:
const FNavAgentProperties& NavAgentProps = NavAgent->GetNavAgentPropertiesRef();
if (NavAgentProps.AgentRadius < 0.0f
|| NavAgentProps.AgentHeight < 0.0f)
{
return false;
}
OutCapsule.Radius = NavAgentProps.AgentRadius;
OutCapsule.Height = NavAgentProps.AgentHeight;
if (NavAgentProps.HasStepHeightOverride())
{
OutCapsule.StepHeight = NavAgentProps.AgentStepHeight;
}
else
{
#Loc: <Workspace>/Engine/Plugins/Runtime/SmartObjects/Source/SmartObjectsModule/Private/SmartObjectTypes.cpp:137
Scope (from outer to inner):
file
function bool FSmartObjectSlotValidationParams::GetPreviewUserCapsule
Source code excerpt:
const FNavDataConfig& Config = SupportedAgents[0];
OutCapsule.Radius = Config.AgentRadius;
OutCapsule.Height = Config.AgentHeight;
OutCapsule.StepHeight = Config.AgentStepHeight;
}
else
{
OutCapsule = UserCapsule;
}
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/AI/Navigation/NavigationTypes.h:460
Scope: file
Source code excerpt:
/** Total height of the capsule used for navigation/pathfinding. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=MovementProperties, meta=(DisplayName="Nav Agent Height"))
float AgentHeight;
/** Step height to use, or -1 for default value from navdata's config. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=MovementProperties, meta=(DisplayName="Nav Agent Step Height"))
float AgentStepHeight;
/** Scale factor to apply to height of bounds when searching for navmesh to project to when nav walking */
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/AI/Navigation/NavigationTypes.h:475
Scope (from outer to inner):
file
function FNavAgentProperties
Source code excerpt:
FNavAgentProperties(float Radius = -1.f, float Height = -1.f)
: AgentRadius(Radius), AgentHeight(Height), AgentStepHeight(-1), NavWalkingSearchHeightScale(0.5f)
{}
ENGINE_API FNavAgentProperties(const FNavAgentProperties& Other);
ENGINE_API FNavAgentProperties& operator=(const FNavAgentProperties& Other);
ENGINE_API void UpdateWithCollisionComponent(class UShapeComponent* CollisionComponent);
FORCEINLINE bool IsValid() const { return AgentRadius >= 0.f && AgentHeight >= 0.f; }
FORCEINLINE bool HasStepHeightOverride() const { return AgentStepHeight >= 0.0f; }
ENGINE_API bool IsNavDataMatching(const FNavAgentProperties& Other) const;
FORCEINLINE bool IsEquivalent(const FNavAgentProperties& Other, float Precision = 5.f) const
{
return FGenericPlatformMath::Abs(AgentRadius - Other.AgentRadius) < Precision
&& FGenericPlatformMath::Abs(AgentHeight - Other.AgentHeight) < Precision
&& ((HasStepHeightOverride() == false)
|| (Other.HasStepHeightOverride() == false)
|| FGenericPlatformMath::Abs(AgentStepHeight - Other.AgentStepHeight) < Precision)
&& IsNavDataMatching(Other);
}
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/AI/Navigation/NavigationTypes.h:506
Scope (from outer to inner):
file
function FVector GetExtent
Source code excerpt:
{
return IsValid()
? FVector(AgentRadius, AgentRadius, AgentHeight / 2)
: INVALID_NAVEXTENT;
}
ENGINE_API void SetPreferredNavData(TSubclassOf<AActor> NavDataClass);
static ENGINE_API const FNavAgentProperties DefaultProperties;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/AI/Navigation/NavigationTypes.h:516
Scope (from outer to inner):
file
function inline uint32 GetTypeHash
Source code excerpt:
friend inline uint32 GetTypeHash(const FNavAgentProperties& A)
{
return ((int16(A.AgentRadius) << 16) | int16(A.AgentHeight)) ^ int32(A.AgentStepHeight);
}
};
PRAGMA_DISABLE_DEPRECATION_WARNINGS
USTRUCT(BlueprintType)
struct FNavDataConfig : public FNavAgentProperties
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/CharacterMovementComponent.cpp:5756
Scope (from outer to inner):
file
function bool UCharacterMovementComponent::FindNavFloor
Source code excerpt:
const FNavAgentProperties& AgentProps = CharacterOwner->GetNavAgentPropertiesRef();
const float SearchRadius = AgentProps.AgentRadius * 2.0f;
const float SearchHeight = AgentProps.AgentHeight * AgentProps.NavWalkingSearchHeightScale;
return NavData->ProjectPoint(TestLocation, NavFloorLocation, FVector(SearchRadius, SearchRadius, SearchHeight));
}
FVector UCharacterMovementComponent::ProjectLocationFromNavMesh(float DeltaSeconds, const FVector& CurrentFeetLocation, const FVector& TargetNavLocation, float UpOffset, float DownOffset)
{
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/NavMovementComponent.cpp:88
Scope (from outer to inner):
file
function void UNavMovementComponent::UpdateNavAgent
Source code excerpt:
Owner.GetSimpleCollisionCylinder(BoundRadius, BoundHalfHeight);
NavAgentProps.AgentRadius = BoundRadius;
NavAgentProps.AgentHeight = BoundHalfHeight * 2.f;
}
void UNavMovementComponent::UpdateNavAgent(const UCapsuleComponent& CapsuleComponent)
{
if (ShouldUpdateNavAgentWithOwnersCollision() == false)
{
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/NavMovementComponent.cpp:102
Scope (from outer to inner):
file
function void UNavMovementComponent::UpdateNavAgent
Source code excerpt:
NavAgentProps.AgentRadius = CapsuleComponent.GetScaledCapsuleRadius();
NavAgentProps.AgentHeight = CapsuleComponent.GetScaledCapsuleHalfHeight() * 2.f;
}
void UNavMovementComponent::SetUpdateNavAgentWithOwnersCollisions(bool bUpdateWithOwner)
{
bUpdateNavAgentWithOwnersCollision = bUpdateWithOwner;
}
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/NavMeshRenderingComponent.cpp:580
Scope (from outer to inner):
file
function void FNavMeshSceneProxyData::GatherData
Source code excerpt:
(Mode == ERuntimeGenerationType::Dynamic ? TEXT("Dynamic") : (Mode == ERuntimeGenerationType::DynamicModifiersOnly ? TEXT("DynamicModifersOnly") : TEXT("Unknown")));
DebugLabels.Add(FDebugText(FString::Printf(TEXT("%s (%s%s)"), *NavMesh->GetName(), NavMesh->bIsWorldPartitioned ? TEXT("WP ") : TEXT(""), *GenerationMode)));
DebugLabels.Add(FDebugText(FString::Printf(TEXT("AgentRadius %0.1f, AgentHeight %0.1f"), NavMesh->AgentRadius, NavMesh->AgentHeight)));
DebugLabels.Add(FDebugText(FString::Printf(
TEXT("CellSizes %0.1f/%0.1f/%0.1f, CellHeights %0.1f/%0.1f/%0.1f, AgentMaxStepHeight %0.1f/%0.1f/%0.1f (low/default/high)"),
NavMesh->GetCellSize(ENavigationDataResolution::Low), NavMesh->GetCellSize(ENavigationDataResolution::Default), NavMesh->GetCellSize(ENavigationDataResolution::High),
NavMesh->GetCellHeight(ENavigationDataResolution::Low), NavMesh->GetCellHeight(ENavigationDataResolution::Default), NavMesh->GetCellHeight(ENavigationDataResolution::High),
NavMesh->GetAgentMaxStepHeight(ENavigationDataResolution::Low), NavMesh->GetAgentMaxStepHeight(ENavigationDataResolution::Default), NavMesh->GetAgentMaxStepHeight(ENavigationDataResolution::High)
)));
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/PImplRecastNavMesh.cpp:580
Scope (from outer to inner):
file
function void FPImplRecastNavMesh::Serialize
Source code excerpt:
else
{
Params.walkableHeight = NavMeshOwner->AgentHeight;
Params.walkableRadius = NavMeshOwner->AgentRadius;
Params.walkableClimb = NavMeshOwner->GetAgentMaxStepHeight(ENavigationDataResolution::Default);
const float DefaultQuantFactor = 1.f / NavMeshOwner->GetCellSize(ENavigationDataResolution::Default);
for(uint8 Index = 0; Index < (uint8)ENavigationDataResolution::MAX; Index++)
{
Params.resolutionParams[Index].bvQuantFactor = DefaultQuantFactor;
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/RecastNavMesh.cpp:429
Scope (from outer to inner):
file
function FRecastNavMeshGenerationProperties::FRecastNavMeshGenerationProperties
Source code excerpt:
CellHeight = 10;
AgentRadius = 34.f;
AgentHeight = 144.f;
AgentMaxSlope = 44.f;
AgentMaxStepHeight = 35.f;
MinRegionArea = 0.f;
MergeRegionSize = 400.f;
MaxSimplificationError = 1.3f; // from RecastDemo
TileNumberHardLimit = 1 << 20;
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/RecastNavMesh.cpp:461
Scope (from outer to inner):
file
function FRecastNavMeshGenerationProperties::FRecastNavMeshGenerationProperties
Source code excerpt:
CellHeight = RecastNavMesh.GetCellHeight(ENavigationDataResolution::Default);
AgentRadius = RecastNavMesh.AgentRadius;
AgentHeight = RecastNavMesh.AgentHeight;
AgentMaxSlope = RecastNavMesh.AgentMaxSlope;
AgentMaxStepHeight = RecastNavMesh.GetAgentMaxStepHeight(ENavigationDataResolution::Default); //FRecastNavMeshGenerationProperties is getting deprecated
MinRegionArea = RecastNavMesh.MinRegionArea;
MergeRegionSize = RecastNavMesh.MergeRegionSize;
MaxSimplificationError = RecastNavMesh.MaxSimplificationError;
TileNumberHardLimit = RecastNavMesh.TileNumberHardLimit;
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/RecastNavMesh.cpp:1204
Scope (from outer to inner):
file
function void ARecastNavMesh::SetConfig
Source code excerpt:
// Step 2: update ARecastNavMesh from the new NavDataConfig
AgentHeight = NavDataConfig.AgentHeight;
AgentRadius = NavDataConfig.AgentRadius;
if (Src.HasStepHeightOverride())
{
// If there is an override, apply it to all resolutions
for (int32 Index = 0; Index < (int32)ENavigationDataResolution::MAX; Index++)
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/RecastNavMesh.cpp:1220
Scope (from outer to inner):
file
function void ARecastNavMesh::FillConfig
Source code excerpt:
{
Dest = NavDataConfig;
Dest.AgentHeight = AgentHeight;
Dest.AgentRadius = AgentRadius;
Dest.AgentStepHeight = GetAgentMaxStepHeight(ENavigationDataResolution::Default);
}
void ARecastNavMesh::BeginBatchQuery() const
{
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/RecastNavMesh.cpp:3442
Scope (from outer to inner):
file
function void ARecastNavMesh::UpdateGenerationProperties
Source code excerpt:
AgentRadius = GenerationProps.AgentRadius;
AgentHeight = GenerationProps.AgentHeight;
AgentMaxSlope = GenerationProps.AgentMaxSlope;
AgentMaxStepHeight = GenerationProps.AgentMaxStepHeight;
MinRegionArea = GenerationProps.MinRegionArea;
MergeRegionSize = GenerationProps.MergeRegionSize;
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/RecastNavMeshGenerator.cpp:2960
Scope (from outer to inner):
file
function void FRecastTileGenerator::GenerateRecastFilter
Source code excerpt:
// TileConfig.walkableHeight is set to 1 when marking low spans, calculate real value for filtering
const int32 FilterWalkableHeight = FMath::CeilToInt(TileConfig.AgentHeight / static_cast<float>(TileConfig.ch));
// Once all geometry is rasterized, we do initial pass of filtering to
// remove unwanted overhangs caused by the conservative rasterization
// as well as filter spans where the character cannot possibly stand.
{
rcFilterLowHangingWalkableObstacles(&BuildContext, TileConfig.walkableClimb, *RasterContext.SolidHF);
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/RecastNavMeshGenerator.cpp:3045
Scope (from outer to inner):
file
function ETimeSliceWorkResult FRecastTileGenerator::GenerateRecastFilterTimeSliced
Source code excerpt:
{
// TileConfig.walkableHeight is set to 1 when marking low spans, calculate real value for filtering
const int32 FilterWalkableHeight = FMath::CeilToInt(TileConfig.AgentHeight / static_cast<float>(TileConfig.ch));
if (!TileConfig.bMarkLowHeightAreas)
{
rcFilterWalkableLowHeightSpans(&BuildContext, TileConfig.walkableHeight, *RasterContext.SolidHF);
}
else if (TileConfig.bFilterLowSpanFromTileCache)
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/RecastNavMeshGenerator.cpp:3112
Scope (from outer to inner):
file
function bool FRecastTileGenerator::RecastErodeWalkable
Source code excerpt:
// TileConfig.walkableHeight is set to 1 when marking low spans, calculate real value for filtering
const int32 FilterWalkableHeight = FMath::CeilToInt(TileConfig.AgentHeight / static_cast<float>(TileConfig.ch));
if (TileConfig.walkableRadius > RECAST_VERY_SMALL_AGENT_RADIUS)
{
uint8 FilterFlags = 0;
if (TileConfig.bFilterLowSpanSequences)
{
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/RecastNavMeshGenerator.cpp:3884
Scope (from outer to inner):
file
function bool FRecastTileGenerator::GenerateNavigationDataLayer
Source code excerpt:
Params.offMeshCons = OffMeshData.LinkParams.GetData();
Params.offMeshConCount = OffMeshData.LinkParams.Num();
Params.walkableHeight = TileConfig.AgentHeight;
Params.walkableRadius = TileConfig.AgentRadius;
Params.walkableClimb = TileConfig.AgentMaxClimb;
Params.tileX = TileX;
Params.tileY = TileY;
Params.tileLayer = LayerIdx;
rcVcopy(Params.bmin, GenerationContext.Layer->header->bmin);
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/RecastNavMeshGenerator.cpp:4343
Scope (from outer to inner):
file
function void FRecastTileGenerator::MarkDynamicArea
Source code excerpt:
const bool bExpandTop = TileConfig.bUseExtraTopCellWhenMarkingAreas || Modifier.ShouldExpandTopByCellHeight();
const FVector::FReal OffsetZMax = (bExpandTop ? TileConfig.ch : 0.f);
const FVector::FReal OffsetZMin = TileConfig.ch + (Modifier.ShouldIncludeAgentHeight() ? TileConfig.AgentHeight : 0.0f);
// Check whether modifier affects this layer
const FBox LayerUnrealBounds = Recast2UnrealBox(Layer.header->bmin, Layer.header->bmax);
FBox ModifierBounds = Modifier.GetBounds().TransformBy(LocalToWorld);
ModifierBounds.Min -= FVector(ExpandBy, ExpandBy, OffsetZMin);
ModifierBounds.Max += FVector(ExpandBy, ExpandBy, OffsetZMax);
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/RecastNavMeshGenerator.cpp:4666
Scope (from outer to inner):
file
function void FRecastNavMeshGenerator::SetupTileConfig
Source code excerpt:
// Update all settings that depends directly or indirectly of the CellHeight
OutConfig.ch = CellHeight;
OutConfig.walkableHeight = DestNavMesh->bMarkLowHeightAreas ? 1 : FMath::CeilToInt(DestNavMesh->AgentHeight / CellHeight);
OutConfig.walkableClimb = FMath::CeilToInt(AgentMaxStepHeight / CellHeight);
// Update all settings that depends directly or indirectly of AgentMaxStepHeight
OutConfig.AgentMaxClimb = AgentMaxStepHeight;
OutConfig.bIsTileSetupConfigCompleted = true;
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/RecastNavMeshGenerator.cpp:4680
Scope (from outer to inner):
file
function void FRecastNavMeshGenerator::ConfigureBuildProperties
Source code excerpt:
const float CellSize = DestNavMesh->GetCellSize(ENavigationDataResolution::Default);
const float CellHeight = DestNavMesh->GetCellHeight(ENavigationDataResolution::Default);
const float AgentHeight = DestNavMesh->AgentHeight;
const float AgentMaxSlope = DestNavMesh->AgentMaxSlope;
const float AgentMaxClimb = DestNavMesh->GetAgentMaxStepHeight(ENavigationDataResolution::Default);
const float AgentRadius = DestNavMesh->AgentRadius;
OutConfig.Reset();
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/RecastNavMeshGenerator.cpp:4690
Scope (from outer to inner):
file
function void FRecastNavMeshGenerator::ConfigureBuildProperties
Source code excerpt:
OutConfig.ch = CellHeight;
OutConfig.walkableSlopeAngle = AgentMaxSlope;
OutConfig.walkableHeight = FMath::CeilToInt(AgentHeight / CellHeight);
OutConfig.walkableClimb = FMath::CeilToInt(AgentMaxClimb / CellHeight);
OutConfig.walkableRadius = FMath::CeilToInt(AgentRadius / CellSize);
OutConfig.maxStepFromWalkableSlope = OutConfig.cs * FMath::Tan(FMath::DegreesToRadians(OutConfig.walkableSlopeAngle));
// For each navmesh resolutions, validate that AgentMaxStepHeight is high enough for the AgentMaxSlope angle
for (int32 Index = 0; Index < (uint8)ENavigationDataResolution::MAX; Index++)
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/RecastNavMeshGenerator.cpp:4721
Scope (from outer to inner):
file
function void FRecastNavMeshGenerator::ConfigureBuildProperties
Source code excerpt:
// store original sizes
OutConfig.AgentHeight = AgentHeight;
OutConfig.AgentMaxClimb = AgentMaxClimb;
OutConfig.AgentRadius = AgentRadius;
OutConfig.borderSize = OutConfig.walkableRadius + 3; // +1 for voxelization rounding, +1 for ledge neighbor access, +1 for occasional errors
OutConfig.maxEdgeLen = (int32)(1200.0f / CellSize);
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/RecastNavMeshGenerator.cpp:4961
Scope (from outer to inner):
file
function bool FRecastNavMeshGenerator::ConstructTiledNavMesh
Source code excerpt:
TiledMeshParameters.walkableClimb = Config.AgentMaxClimb;
TiledMeshParameters.walkableHeight = Config.AgentHeight;
TiledMeshParameters.walkableRadius = Config.AgentRadius;
TiledMeshParameters.resolutionParams[(uint8)ENavigationDataResolution::Low].bvQuantFactor = 1.f / DestNavMesh->GetCellSize(ENavigationDataResolution::Low);
TiledMeshParameters.resolutionParams[(uint8)ENavigationDataResolution::Default].bvQuantFactor = 1.f / DestNavMesh->GetCellSize(ENavigationDataResolution::Default);
TiledMeshParameters.resolutionParams[(uint8)ENavigationDataResolution::High].bvQuantFactor = 1.f / DestNavMesh->GetCellSize(ENavigationDataResolution::High);
if (TiledMeshParameters.maxTiles == 0)
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/RecastNavMeshGenerator.cpp:5895
Scope (from outer to inner):
file
function FBox FRecastNavMeshGenerator::GrowBoundingBox
Source code excerpt:
FBox FRecastNavMeshGenerator::GrowBoundingBox(const FBox& BBox, bool bIncludeAgentHeight) const
{
const FVector BBoxGrowOffsetMin = FVector(0, 0, bIncludeAgentHeight ? Config.AgentHeight : 0.0f);
return FBox(BBox.Min - BBoxGrowth - BBoxGrowOffsetMin, BBox.Max + BBoxGrowth);
}
bool FRecastNavMeshGenerator::ShouldGenerateGeometryForOctreeElement(const FNavigationOctreeElement& Element, const FNavDataConfig& NavDataConfig) const
{
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavMesh/RecastNavMeshGenerator.cpp:7549
Scope (from outer to inner):
file
function void FRecastNavMeshGenerator::ExportNavigationData
Source code excerpt:
check(CurrentGen);
AdditionalData += FString::Printf(TEXT("# AgentHeight\n"));
AdditionalData += FString::Printf(TEXT("rd_agh %5.5f\n"), CurrentGen->Config.AgentHeight);
AdditionalData += FString::Printf(TEXT("# AgentRadius\n"));
AdditionalData += FString::Printf(TEXT("rd_agr %5.5f\n"), CurrentGen->Config.AgentRadius);
AdditionalData += FString::Printf(TEXT("# Cell Size\n"));
AdditionalData += FString::Printf(TEXT("rd_cs %5.5f\n"), CurrentGen->Config.cs);
AdditionalData += FString::Printf(TEXT("# Cell Height\n"));
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavigationSystem.cpp:2176
Scope (from outer to inner):
file
function const ANavigationData* UNavigationSystemV1::GetNavDataForProps
Source code excerpt:
float ExcessRadius = -FLT_MAX;
float ExcessHeight = -FLT_MAX;
const float AgentHeight = bSkipAgentHeightCheckWhenPickingNavData ? 0.f : AgentProperties.AgentHeight;
for (TArray<FNavAgentProperties>::TConstIterator It(AgentPropertiesList); It; ++It)
{
const FNavAgentProperties& NavIt = *It;
const bool bNavClassMatch = NavIt.IsNavDataMatching(AgentProperties);
if (!bNavClassMatch)
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavigationSystem.cpp:2188
Scope (from outer to inner):
file
function const ANavigationData* UNavigationSystemV1::GetNavDataForProps
Source code excerpt:
ExcessRadius = NavIt.AgentRadius - AgentProperties.AgentRadius;
ExcessHeight = bSkipAgentHeightCheckWhenPickingNavData ? 0.f : (NavIt.AgentHeight - AgentHeight);
const bool bExcessRadiusIsBetter = ((ExcessRadius == 0) && (BestExcessRadius != 0))
|| ((ExcessRadius > 0) && (BestExcessRadius < 0))
|| ((ExcessRadius > 0) && (BestExcessRadius > 0) && (ExcessRadius < BestExcessRadius))
|| ((ExcessRadius < 0) && (BestExcessRadius < 0) && (ExcessRadius > BestExcessRadius));
const bool bExcessHeightIsBetter = ((ExcessHeight == 0) && (BestExcessHeight != 0))
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavigationTestingActor.cpp:43
Scope (from outer to inner):
file
function ANavigationTestingActor::ANavigationTestingActor
Source code excerpt:
bIsEditorOnlyActor = true;
NavAgentProps.AgentRadius = 34.f;
NavAgentProps.AgentHeight = 144.f;
CostLimitFactor = FLT_MAX;
MinimumCostLimit = 0.f;
ShowStepIndex = -1;
bShowNodePool = true;
bShowBestPath = true;
bShowDiffWithPreviousStep = false;
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavigationTestingActor.cpp:62
Scope (from outer to inner):
file
function ANavigationTestingActor::ANavigationTestingActor
Source code excerpt:
CapsuleComponent = CreateDefaultSubobject<UCapsuleComponent>(TEXT("CollisionCylinder"));
CapsuleComponent->InitCapsuleSize(NavAgentProps.AgentRadius, NavAgentProps.AgentHeight / 2);
CapsuleComponent->SetCollisionProfileName(UCollisionProfile::NoCollision_ProfileName);
CapsuleComponent->CanCharacterStepUpOn = ECB_No;
CapsuleComponent->SetShouldUpdatePhysicsVolume(true);
CapsuleComponent->SetCanEverAffectNavigation(false);
RootComponent = CapsuleComponent;
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Private/NavigationTestingActor.cpp:128
Scope (from outer to inner):
file
function void ANavigationTestingActor::PostEditChangeProperty
Source code excerpt:
if (ChangedPropName == GET_MEMBER_NAME_CHECKED(FNavAgentProperties,AgentRadius) ||
ChangedPropName == GET_MEMBER_NAME_CHECKED(FNavAgentProperties,AgentHeight))
{
MyNavData = NULL;
UpdateNavData();
CapsuleComponent->SetCapsuleSize(NavAgentProps.AgentRadius, NavAgentProps.AgentHeight/2);
}
else if (ChangedPropName == GET_MEMBER_NAME_CHECKED(ANavigationTestingActor,QueryingExtent))
{
UpdateNavData();
UNavigationSystemV1* NavSys = FNavigationSystem::GetCurrent<UNavigationSystemV1>(GetWorld());
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Public/NavMesh/RecastNavMesh.h:354
Scope: file
Source code excerpt:
/** Size of the tallest agent that will path with this navmesh. */
UPROPERTY(EditAnywhere, Category = Generation, meta = (ClampMin = "0.0"))
float AgentHeight;
/* The maximum slope (angle) that the agent can move on. */
UPROPERTY(EditAnywhere, Category = Generation, meta = (ClampMin = "0.0", ClampMax = "89.0", UIMin = "0.0", UIMax = "89.0"))
float AgentMaxSlope;
/** Largest vertical step the agent can perform */
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Public/NavMesh/RecastNavMesh.h:783
Scope (from outer to inner):
file
class class ARecastNavMesh : public ANavigationData
Source code excerpt:
/** Size of the tallest agent that will path with this navmesh. */
UPROPERTY(EditAnywhere, Category = Generation, config, meta = (ClampMin = "0.0"))
float AgentHeight;
/* The maximum slope (angle) that the agent can move on. */
UPROPERTY(EditAnywhere, Category=Generation, config, meta=(ClampMin = "0.0", ClampMax = "89.0", UIMin = "0.0", UIMax = "89.0" ))
float AgentMaxSlope;
/** Largest vertical step the agent can perform */
#Loc: <Workspace>/Engine/Source/Runtime/NavigationSystem/Public/NavMesh/RecastNavMeshGenerator.h:74
Scope: file
Source code excerpt:
/** Actual agent height (in uu)*/
float AgentHeight;
/** Actual agent climb (in uu)*/
float AgentMaxClimb;
/** Actual agent radius (in uu)*/
float AgentRadius;
/** Agent index for filtering links */
int32 AgentIndex;