13#include "CrowdFollowingComponent.generated.h"
37UCLASS(BlueprintType, MinimalAPI)
48 AIMODULE_API virtual float GetCrowdAgentMaxSpeed()
const override;
66 virtual int32 GetCurrentPathElement()
const override {
return LastPathPolyIndex; }
67 AIMODULE_API virtual void OnNavigationInitDone()
override;
80 UFUNCTION(BlueprintCallable, Category =
"Crowd")
101 AIMODULE_API void SetCrowdAffectFallingVelocity(
bool bEnable);
102 AIMODULE_API void SetCrowdRotateToVelocity(
bool bEnable);
108 inline bool IsCrowdSimulatioSuspended()
const {
return bSuspendCrowdSimulation; }
109 inline bool IsCrowdAnticipateTurnsEnabled()
const {
return bEnableAnticipateTurns; }
110 inline bool IsCrowdObstacleAvoidanceEnabled()
const {
return bEnableObstacleAvoidance; }
111 inline bool IsCrowdSeparationEnabled()
const {
return bEnableSeparation; }
112 inline bool IsCrowdOptimizeVisibilityEnabled()
const {
return bEnableOptimizeVisibility; }
113 inline bool IsCrowdOptimizeTopologyEnabled()
const {
return bEnableOptimizeTopology; }
114 inline bool IsCrowdPathOffsetEnabled()
const {
return bEnablePathOffset; }
115 inline bool IsCrowdSlowdownAtGoalEnabled()
const {
return bEnableSlowdownAtGoal; }
116 inline bool IsCrowdAffectFallingVelocityEnabled()
const {
return bAffectFallingVelocity; }
117 inline bool IsCrowdRotateToVelocityEnabled()
const {
return bRotateToVelocity; }
120 inline bool IsCrowdSimulationActive()
const {
return IsCrowdSimulationEnabled() && !IsCrowdSimulatioSuspended(); }
122 inline bool IsCrowdAnticipateTurnsActive()
const {
return IsCrowdAnticipateTurnsEnabled() && !IsCrowdSimulatioSuspended(); }
124 inline bool IsCrowdObstacleAvoidanceActive()
const {
return IsCrowdObstacleAvoidanceEnabled() && !IsCrowdSimulatioSuspended(); }
126 inline bool IsCrowdSeparationActive()
const {
return IsCrowdSeparationEnabled() && !IsCrowdSimulatioSuspended(); }
128 inline bool IsCrowdOptimizeTopologyActive()
const {
return IsCrowdOptimizeTopologyEnabled() && !IsCrowdSimulatioSuspended(); }
130 inline float GetCrowdSeparationWeight()
const {
return SeparationWeight; }
131 inline float GetCrowdCollisionQueryRange()
const {
return CollisionQueryRange; }
132 inline float GetCrowdPathOptimizationRange()
const {
return PathOptimizationRange; }
134 inline float GetCrowdAvoidanceRangeMultiplier()
const {
return AvoidanceRangeMultiplier; }
144 UE_DEPRECATED_FORGAME(4.16,
"Use ApplyCrowdAgentVelocity function with bIsNearEndOfPath param instead.")
158#if WITH_EDITORONLY_DATA
229 AIMODULE_API virtual void FollowPathSegment(
float DeltaTime)
override;
230 AIMODULE_API virtual bool ShouldCheckPathOnResume()
const override;
#define UE_DEPRECATED_FORGAME
Definition CoreMiscDefines.h:377
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
ECrowdSimulationState
Definition CrowdFollowingComponent.h:31
uint64 NavNodeRef
Definition NavigationTypes.h:34
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
EPathFollowingVelocityMode
Definition PathFollowingComponent.h:195
Definition CrowdAgentInterface.h:18
Definition NavLinkCustomInterface.h:40
Definition RVOAvoidanceInterface.h:23
Definition EnumAsByte.h:22
Definition CrowdFollowingComponent.h:39
uint8 bCanCheckMovingTooFar
Definition CrowdFollowingComponent.h:199
float CollisionQueryRange
Definition CrowdFollowingComponent.h:213
uint8 bEnableOptimizeVisibility
Definition CrowdFollowingComponent.h:190
friend UCrowdManager
Definition CrowdFollowingComponent.h:245
TEnumAsByte< ECrowdAvoidanceQuality::Type > AvoidanceQuality
Definition CrowdFollowingComponent.h:209
TWeakInterfacePtr< IRVOAvoidanceInterface > AvoidanceInterface
Definition CrowdFollowingComponent.h:151
int32 PathStartIndex
Definition CrowdFollowingComponent.h:220
uint8 bEnableSeparation
Definition CrowdFollowingComponent.h:189
float SeparationWeight
Definition CrowdFollowingComponent.h:212
uint8 bEnableSimulationReplanOnResume
Definition CrowdFollowingComponent.h:207
uint8 bFinalPathPart
Definition CrowdFollowingComponent.h:196
float PathOptimizationRange
Definition CrowdFollowingComponent.h:214
uint8 bEnableObstacleAvoidance
Definition CrowdFollowingComponent.h:188
uint8 bEnableOptimizeTopology
Definition CrowdFollowingComponent.h:191
uint8 bCanUpdatePathPartInTick
Definition CrowdFollowingComponent.h:202
uint8 bCheckMovementAngle
Definition CrowdFollowingComponent.h:205
ECrowdSimulationState SimulationState
Definition CrowdFollowingComponent.h:210
uint8 bRegisteredWithCrowdSimulation
Definition CrowdFollowingComponent.h:182
uint8 bSuspendCrowdSimulation
Definition CrowdFollowingComponent.h:185
uint8 bEnableSlowdownAtGoal
Definition CrowdFollowingComponent.h:193
uint8 bEnableAnticipateTurns
Definition CrowdFollowingComponent.h:187
int32 LastPathPolyIndex
Definition CrowdFollowingComponent.h:223
uint8 bEnablePathOffset
Definition CrowdFollowingComponent.h:192
float AvoidanceRangeMultiplier
Definition CrowdFollowingComponent.h:217
uint8 bAffectFallingVelocity
Definition CrowdFollowingComponent.h:173
uint8 bRotateToVelocity
Definition CrowdFollowingComponent.h:176
uint8 bUpdateDirectMoveVelocity
Definition CrowdFollowingComponent.h:179
Definition CrowdManager.h:174
Definition PathFollowingComponent.h:217
Definition CrowdFollowingComponent.h:20
Type
Definition CrowdFollowingComponent.h:22
@ Good
Definition CrowdFollowingComponent.h:25
@ Low
Definition CrowdFollowingComponent.h:23
@ High
Definition CrowdFollowingComponent.h:26
@ Medium
Definition CrowdFollowingComponent.h:24
uint16 Type
Definition PathFollowingComponent.h:79
static AIMODULE_API const FAIRequestID CurrentRequest
Definition AITypes.h:452
Definition NavigationAvoidanceTypes.h:13
Definition NavigationData.h:87
Definition NavigationSystemTypes.h:62
Definition PathFollowingComponent.h:122
Definition VisualLoggerTypes.h:205
Definition WeakInterfacePtr.h:18