FCharacterMovementComponentAsyncInput

Contains all input and implementation required to run async character movement.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

FSimCallbackInput

FCharacterMovementComponentAsyncInput

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/CharacterMovementComponentAsync.h

Include

#include "CharacterMovementComponentAsync.h"

Syntax

struct FCharacterMovementComponentAsyncInput : public Chaos::FSimCallbackInput

Remarks

Contains all input and implementation required to run async character movement. Base implementation is from CharacterMovementComponent. Contains 'CharacterInput' and 'UpdatedComponentInput' represent data/impl of Character and our UpdatedComponent. All input is const, non-const data goes in output. 'AsyncSimState' points to non-const sim state.

Variables

Name Description

Public variable

float

 

AirControl

Public variable

float

 

AirControlBoostMultiplier

Public variable

float

 

AirControlBoostVelocityThreshold

Public variable

TSharedPtr< FCh...

 

AsyncSimState

This is the latest simulated state of this movement component.

Public variable

bool

 

bAllowPhysicsRotationDuringAnimRootMotion

Public variable

bool

 

bAlwaysCheckFloor

Public variable

bool

 

bApplyGravityWhileJumping

Public variable

bool

 

bCanEverCrouch

Public variable

bool

 

bCanWalkOffLedges

Public variable

bool

 

bCanWalkOffLedgesWhenCrouching

Public variable

bool

 

bConstrainToPlane

Public variable

bool

 

bDeferUpdateMoveComponent

Public variable

bool

 

bForceMaxAccel

Public variable

bool

 

bHasValidData

Public variable

bool

 

bIgnoreBaseRotation

Public variable

bool

 

bInitialized

Has this been filled out?

Public variable

bool

 

bIsNetModeClient

Public variable

bool

 

bMaintainHorizontalGroundVelocity

Public variable

bool

 

bMovementStateCanJump

Public variable

bool

 

bNavAgentPropsCanJump

Public variable

bool

 

bOrientRotationToMovement

Public variable

float

 

BrakingDecelerationFalling

Public variable

float

 

BrakingDecelerationFlying

Public variable

float

 

BrakingDecelerationSwimming

Public variable

float

 

BrakingDecelerationWalking

Public variable

float

 

BrakingFriction

Public variable

float

 

BrakingFrictionFactor

Public variable

float

 

BrakingSubStepTime

Public variable

bool

 

bRequestedMoveUseAcceleration

Public variable

bool

 

bRunPhysicsWithNoController

Public variable

bool

 

bUseControllerDesiredRotation

Public variable

bool

 

bUseFlatBaseForFloorChecks

Public variable

bool

 

bUseSeparateBrakingFriction

Public variable

bool

 

bWasSimulatingRootMotion

Public variable

FCollisionQuery...

 

CapsuleParams

Public variable

TUniquePtr< FCh...

 

CharacterInput

Public variable

ECollisionChann...

 

CollisionChannel

Public variable

FCollisionRespo...

 

CollisionResponseParams

Public variable

EMovementMode

 

DefaultLandMovementMode

Public variable

float

 

FallingLateralFriction

Public variable

float

 

GravityZ

Public variable

float

 

GroundFriction

Public variable

FCharacterMovem...

 

GTInputs

Public variable

FVector

 

InputVector

Public variable

float

 

JumpZVelocity

Public variable

float

 

LedgeCheckThreshold

Public variable

float

 

MaxAcceleration

Public variable

float

 

MaxCustomMovementSpeed

Public variable

float

 

MaxDepenetrationWithGeometry

Public variable

float

 

MaxDepenetrationWithGeometryAsProxy

Public variable

float

 

MaxDepenetrationWithPawn

Public variable

float

 

MaxDepenetrationWithPawnAsProxy

Public variable

float

 

MaxFlySpeed

Public variable

int32

 

MaxJumpApexAttemptsPerSimulation

Public variable

int32

 

MaxSimulationIterations

Public variable

float

 

MaxSimulationTimeStep

Public variable

float

 

MaxStepHeight

Public variable

float

 

MaxSwimSpeed

Public variable

float

 

MaxWalkSpeed

Public variable

float

 

MaxWalkSpeedCrouched

Public variable

float

 

MinAnalogWalkSpeed

Public variable

FCachedMovement...

 

MovementBaseAsyncData

Public variable

ENetworkSmoothi...

 

NetworkSmoothingMode

Public variable

float

 

PerchAdditionalHeight

Public variable

float

 

PerchRadiusThreshold

Public variable

float

 

PhysicsVolumeTerminalVelocity

Public variable

FVector

 

PlaneConstraintNormal

Public variable

FVector

 

PlaneConstraintOrigin

Public variable

FComponentQuery...

 

QueryParams

Primitive component InitSweepCollisionParams

Public variable

FRandomStream

 

RandomStream

Public variable

FRootMotionAsyn...

 

RootMotion

Public variable

FRotator

 

RotationRate

Public variable

TUniquePtr< FUp...

 

UpdatedComponentInput

Public variable

float

 

WalkableFloorZ

Public variable

UWorld *

 

World

Destructors

Functions

Name Description

Public function Virtual Const

void

 

AdjustFloorHeight

Public function Virtual Const

void

 

ApplyAccumulatedForces

(
    float DeltaSeconds,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

bool

 

ApplyRequestedMove

(
    float DeltaTime,
    float MaxAccel,
    float MaxSpeed,
    float Friction,
    float BrakingDeceleration,
    FVector& OutAcceleration,
    float& OutRequestedSpeed,
    FCharacterMovementComponentAsyncOut...
)

Public function Const

void

 

ApplyRootMotionToVelocity

(
    float deltaTime,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

void

 

ApplyVelocityBraking

(
    float DeltaTime,
    float Friction,
    float BrakingDeceleration,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

float

 

BoostAirControl

(
    float DeltaTime,
    float TickAirControl,
    const FVector& FallAcceleration,
    FCharacterMovementComponentAsyncOut...
)

Public function Const

FVector

 

CalcAnimRootMotionVelocity

(
    const FVector& RootMotionDeltaMove,
    float DeltaSeconds,
    const FVector& CurrentVelocity
)

Public function Virtual Const

void

 

CalcVelocity

(
    float DeltaTime,
    float Friction,
    bool bFluid,
    float BrakingDeceleration,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

bool

 

CanAttemptJump

Public function Virtual Const

bool

 

CanCrouchInCurrentState

Public function Virtual Const

bool

 

CanStepUp

(
    const FHitResult& Hit,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

bool

 

CanWalkOffLedges

Public function Virtual Const

bool

 

CheckFall

(
    const FFindFloorResult& OldFloor,
    const FHitResult& Hit,
    const FVector& Delta,
    const FVector& OldLocation,
    float remainingTime,
    float timeTick,
    int32 Iterations,
    bool bMustJump,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

bool

 

CheckLedgeDirection

(
    const FVector& OldLocation,
    const FVector& SideStep,
    const FVector& GravDir,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

void

 

ClearAccumulatedForces

Public function Virtual Const

float

 

ComputeAnalogInputModifier

(
    FVector Acceleration
)

Public function Virtual Const

void

 

ComputeFloorDist

(
    const FVector& CapsuleLocation,
    float LineDistance,
    float SweepDistance,
    FFindFloorResult& OutFloorResult,
    float SweepRadius,
    FCharacterMovementComponentAsyncOut...,
    const FHitResult* DownwardSwee...
)

Public function Virtual Const

FVector

 

ComputeGroundMovementDelta

(
    const FVector& Delta,
    const FHitResult& RampHit,
    const bool bHitFromLineTrace,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

FRotator

 

ComputeOrientToMovementRotation

(
    const FRotator& CurrentRotation,
    float DeltaTime,
    FRotator& DeltaRotation,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

bool

 

ComputePerchResult

(
    const float TestRadius,
    const FHitResult& InHit,
    const float InMaxFloorDist,
    FFindFloorResult& OutPerchFloorRes...,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

FVector

 

ComputeSlideVector

(
    const FVector& Delta,
    const float Time,
    const FVector& Normal,
    const FHitResult& Hit,
    FCharacterMovementComponentAsyncOut...
)

Public function Const

FVector

 

ConstrainAnimRootMotionVelocity

(
    const FVector& RootMotionVelocity,
    const FVector& CurrentVelocity,
    FCharacterMovementComponentAsyncOut...
)

Root Motion Stuff.

Public function Virtual Const

FVector

 

ConstrainDirectionToPlane

(
    FVector Direction
)

Public function Virtual Const

FVector

 

ConstrainInputAcceleration

(
    FVector InputAcceleration,
    const FCharacterMovementComponentAs...
)

Public function Virtual Const

FVector

 

ConstrainLocationToPlane

(
    FVector Location
)

Public function Virtual Const

FVector

 

ConstrainNormalToPlane

(
    FVector Normal
)

Public function Virtual Const

void

 

ControlledCharacterMove

(
    const float DeltaSeconds,
    FCharacterMovementComponentAsyncOut...
)

TODO organize these.

Public function Virtual Const

bool

 

DoJump

(
    bool bReplayingMoves,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

void

 

FindFloor

(
    const FVector& CapsuleLocation,
    FFindFloorResult& OutFloorResult,
    bool bCanUseCachedLocation,
    FCharacterMovementComponentAsyncOut...,
    const FHitResult* DownwardSwee...
)

Public function Virtual Const

bool

 

FloorSweepTest

(
    FHitResult& OutHit,
    const FVector& Start,
    const FVector& End,
    ECollisionChannel TraceChannel,
    const FCollisionShape& CollisionSh...,
    const FCollisionQueryParams& Param...,
    const FCollisionResponseParams& Re...,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

FVector

 

GetAirControl

(
    float DeltaTime,
    float TickAirControl,
    const FVector& FallAcceleration,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

FVector

 

GetFallingLateralAcceleration

(
    float DeltaTime,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

FVector

 

GetLedgeMove

(
    const FVector& OldLocation,
    const FVector& Delta,
    const FVector& GravDir,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

float

 

GetMaxBrakingDeceleration

Public function Virtual Const

float

 

GetMaxSpeed

Public function Virtual Const

float

 

GetMinAnalogSpeed

Public function Const

FCollisionSh...

 

GetPawnCapsuleCollisionShape

(
    const EShrinkCapsuleExtent ShrinkMo...,
    FCharacterMovementComponentAsyncOut...,
    const float CustomShrinkAmount
)

Public function Const

FVector

 

GetPawnCapsuleExtent

(
    const EShrinkCapsuleExtent ShrinkMo...,
    const float CustomShrinkAmount,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

FVector

 

GetPenetrationAdjustment

(
    FHitResult& HitResult
)

Public function Const

float

 

GetPerchRadiusThreshold()

Public function Const

const FRotat...

 

GetRotationRate

(
    const FCharacterMovementComponentAs...
)

Public function Virtual Const

float

 

GetSimulationTimeStep

(
    float RemainingTime,
    int32 Iterations
)

Public function Const

ETeleportTyp...

 

GetTeleportType

Public function Virtual Const

float

 

GetValidPerchRadius

(
    const FCharacterMovementComponentAs...
)

Public function Virtual Const

void

 

HandleImpact

(
    const FHitResult& Impact,
    FCharacterMovementComponentAsyncOut...,
    float TimeSlice,
    const FVector& MoveDelta
)

Public function Virtual Const

FVector

 

HandleSlopeBoosting

(
    const FVector& SlideResult,
    const FVector& Delta,
    const float Time,
    const FVector& Normal,
    const FHitResult& Hit,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

void

 

HandleWalkingOffLedge

(
    const FVector& PreviousFloorImpact...,
    const FVector& PreviousFloorContac...,
    const FVector& PreviousLocation,
    float TimeDelta
)

Public function

void

 

Initialize()

Public function Virtual Const

bool

 

IsCrouching

(
    const FCharacterMovementComponentAs...
)

Public function Virtual Const

bool

 

IsExceedingMaxSpeed

(
    float MaxSpeed,
    const FCharacterMovementComponentAs...
)

Public function Virtual Const

bool

 

IsFalling

(
    const FCharacterMovementComponentAs...
)

Public function Virtual Const

bool

 

IsFlying

(
    const FCharacterMovementComponentAs...
)

Public function Const

bool

 

IsJumpAllowed()

UNavMovementComponent (super class) impl.

Public function Virtual Const

bool

 

IsMovingOnGround

(
    const FCharacterMovementComponentAs...
)

Public function Virtual Const

bool

 

IsValidLandingSpot

(
    const FVector& CapsuleLocation,
    const FHitResult& Hit,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

bool

 

IsWalkable

(
    const FHitResult& Hit
)

Public function Virtual Const

bool

 

IsWithinEdgeTolerance

(
    const FVector& CapsuleLocation,
    const FVector& TestImpactPoint,
    const float CapsuleRadius
)

Public function Virtual Const

FVector

 

LimitAirControl

(
    float DeltaTime,
    const FVector& FallAcceleration,
    const FHitResult& HitResult,
    bool bCheckForValidLandingSpot,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

void

 

MaintainHorizontalGroundVelocity

Public function Virtual Const

void

 

MaybeUpdateBasedMovement

(
    float DeltaSeconds,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

void

 

MoveAlongFloor

(
    const FVector& InVelocity,
    float DeltaSeconds,
    FStepDownResult* OutStepDownRe...,
    FCharacterMovementComponentAsyncOut...
)

Public function Const

FVector

 

MoveComponent_ComputeSlideVector

(
    const FVector& Delta,
    const float Time,
    const FVector& Normal,
    const FHitResult& Hit,
    FCharacterMovementComponentAsyncOut...
)

Public function Const

FVector

 

MoveComponent_GetPenetrationAdjustment

(
    FHitResult& HitResult
)

More from UMovementComponent, this is not impl ported from CharacterMovementComponent, but super class, so we can call Super:: in CMC impl.

Public function Const

float

 

MoveComponent_SlideAlongSurface

(
    const FVector& Delta,
    float Time,
    const FVector& Normal,
    FHitResult& Hit,
    FCharacterMovementComponentAsyncOut...,
    bool bHandleImpact
)

Public function Virtual Const

bool

 

MoveUpdatedComponent

(
    const FVector& Delta,
    const FQuat& NewRotation,
    bool bSweep,
    FCharacterMovementComponentAsyncOut...,
    FHitResult* OutHitResult,
    ETeleportType TeleportType
)

Public function Virtual Const

FVector

 

NewFallVelocity

(
    const FVector& InitialVelocity,
    const FVector& Gravity,
    float DeltaTime,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

void

 

OnCharacterStuckInGeometry

(
    const FHitResult* Hit,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

void

 

OnMovementModeChanged

(
    EMovementMode PreviousMovementMode,
    uint8 PreviousCustomMode,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

void

 

PerformMovement

(
    float DeltaSeconds,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

void

 

PhysFalling

(
    float deltaTime,
    int32 Iterations,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

void

 

PhysicsRotation

(
    float DeltaTime,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

void

 

PhysWalking

(
    float deltaTime,
    int32 Iterations,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

void

 

ProcessLanded

(
    const FHitResult& Hit,
    float remainingTime,
    int32 Iterations,
    FCharacterMovementComponentAsyncOut...
)

Public function

void

 

Reset()

Public function Virtual Const

bool

 

ResolvePenetration

(
    const FVector& Adjustment,
    const FHitResult& Hit,
    const FQuat& NewRotation,
    FCharacterMovementComponentAsyncOut...
)

Public function Const

void

 

RestorePreAdditiveRootMotionVelocity

Public function Const

void

 

RevertMove

(
    const FVector& OldLocation,
    UPrimitiveComponent* OldBase,
    const FVector& PreviousBaseLocatio...,
    const FFindFloorResult& OldFloor,
    bool bFailMove,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

bool

 

SafeMoveUpdatedComponent

(
    const FVector& Delta,
    const FQuat& NewRotation,
    bool bSweep,
    FHitResult& OutHit,
    FCharacterMovementComponentAsyncOut...,
    ETeleportType Teleport
)

Public function Virtual Const

FVector

 

ScaleInputAcceleration

(
    FVector InputAcceleration,
    FCharacterMovementComponentAsyncOut...
)

Public function Const

void

 

SetBaseFromFloor

(
    const FFindFloorResult& FloorResul...,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

void

 

SetDefaultMovementMode

Public function Virtual Const

void

 

SetMovementMode

(
    EMovementMode NewMovementMode,
    FCharacterMovementComponentAsyncOut...,
    uint8 NewCustomMode
)

Public function Virtual Const

void

 

SetPostLandedPhysics

(
    const FHitResult& Hit,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

bool

 

ShouldCatchAir

(
    const FFindFloorResult& OldFloor,
    const FFindFloorResult& NewFloor
)

Public function Virtual Const

bool

 

ShouldCheckForValidLandingSpot

(
    float DeltaTime,
    const FVector& Delta,
    const FHitResult& Hit,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

bool

 

ShouldComputeAccelerationToReachRequestedVelocity

(
    const float RequestedSpeed,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

bool

 

ShouldComputePerchResult

(
    const FHitResult& InHit,
    FCharacterMovementComponentAsyncOut...,
    bool bCheckRadius
)

Public function Virtual Const

bool

 

ShouldLimitAirControl

(
    float DeltaTime,
    const FVector& FallAcceleration,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

bool

 

ShouldRemainVertical

Public function Const

void

 

Simulate

(
    const float DeltaSeconds,
    FCharacterMovementComponentAsyncOut...
)

Entry point of async tick.

Public function Virtual Const

float

 

SlideAlongSurface

(
    const FVector& Delta,
    float Time,
    const FVector& InNormal,
    FHitResult& Hit,
    bool bHandleImpact,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

void

 

StartFalling

(
    int32 Iterations,
    float remainingTime,
    float timeTick,
    const FVector& Delta,
    const FVector& subLoc,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

void

 

StartNewPhysics

(
    float deltaTime,
    int32 Iterations,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

bool

 

StepUp

(
    const FVector& GravDir,
    const FVector& Delta,
    const FHitResult& Hit,
    FCharacterMovementComponentAsyncOut...,
    FStepDownResult* OutStepDownRe...
)

Public function Const

void

 

TwoWallAdjust

(
    FVector& OutDelta,
    const FHitResult& Hit,
    const FVector& OldHitNormal,
    FCharacterMovementComponentAsyncOut...
)

Public function Const

void

 

UpdateAsyncStateFromGTInputs_Internal()

Public function Virtual Const

void

 

UpdateBasedMovement

(
    float DeltaSeconds,
    FCharacterMovementComponentAsyncOut...
)

Public function Virtual Const

void

 

UpdateCharacterStateAfterMovement

(
    float DeltaSeconds,
    FCharacterMovementComponentAsyncOut...
)

Typedefs