19 #include "AI/Navigation/AvoidanceManager.h"
21 #include "GameFramework/FloatingPawnMovement.h"
25 #include "RRFloatingMovementComponent.generated.h"
29 #define RAPYUTA_FLOAT_MOVEMENT_DEBUG (0)
64 virtual void SetUpdatedComponent(USceneComponent* InNewUpdatedComponent)
override;
70 b2DMovement = bEnabled;
91 FVector AngularVelocity = FVector::ZeroVector;
104 float MaxAngularSpeed = 360.f;
112 bUseDecelerationForPaths = bEnabled;
122 return bUseDecelerationForPaths;
132 bUseAccelerationForPaths = bEnabled;
142 PenetrationPullbackDistance = PullbackDistance;
148 virtual void StopMovementImmediately()
override;
161 int32 RVOAvoidanceUID = 0;
177 float RVOAvoidanceWeight = 0.5f;
191 TObjectPtr<UAvoidanceManager> RVOAvoidanceManager =
nullptr;
193 void SetRVOAvoidanceEnabled(
bool bEnabled);
195 void SetRVOAvoidanceVelocityLock(
float InDuration);
204 FVector RVOAvoidanceLockVelocity = FVector::ZeroVector;
211 float RVOAvoidanceLockTimeout = 0.f;
217 virtual void OnRegister()
override;
219 virtual void TickComponent(
float InDeltaTime,
enum ELevelTick InTickType, FActorComponentTickFunction* InTickFunction)
override;
221 virtual bool IsExceedingMaxSpeed(
float InMaxSpeed)
const override;
223 virtual FVector GetPenetrationAdjustment(
const FHitResult& Hit)
const;
225 #if RAPYUTA_FLOAT_MOVEMENT_DEBUG
227 virtual bool ResolvePenetrationImpl(
const FVector& InProposedAdjustment,
229 const FHitResult& InHit,
231 const FQuat& InNewRotationQuat)
override;
235 void UpdateDefaultAvoidance();
237 void CalculateRVOAvoidanceVelocity(
float InDeltaTime);
281 float PenetrationPullbackDistance = 0.f;