Atlas
Engine/Source/Runtime/Engine/Private/Components/CharacterMovementComponent.cpp
21void UCharacterMovementComponent::PhysWalking(float deltaTime, int32 Iterations)
25 while ((deltaTime >= MIN_TICK_TIME) && (Iterations < MaxSimulationIterations))

void UCharacterMovementComponent::PerformMovement(float DeltaSeconds)
{
SCOPE_CYCLE_COUNTER(STAT_CharacterMovementPerformMovement);

if (!HasValidData() || UpdatedComponent->IsSimulatingPhysics())
{
return;
}

// Integrate pending root motion and velocity for the active movement mode.
StartNewPhysics(DeltaSeconds, 0);
UpdateComponentVelocity();
}

void UCharacterMovementComponent::PhysWalking(float deltaTime, int32 Iterations)
{
SCOPE_CYCLE_COUNTER(STAT_CharPhysWalking);

while ((deltaTime >= MIN_TICK_TIME) && (Iterations < MaxSimulationIterations))
{
Iterations++;
const float timeTick = GetSimulationTimeStep(deltaTime, Iterations);
deltaTime -= timeTick;

const FVector OldLocation = UpdatedComponent->GetComponentLocation();
FStepDownResult StepDownResult;

// Project horizontal velocity onto the current floor plane and sweep.
MoveAlongFloor(Velocity, timeTick, &StepDownResult);

// Reuse the step-down floor hit when available to avoid a redundant sweep.
if (StepDownResult.bComputedFloor)
{
CurrentFloor = StepDownResult.FloorResult;
}
else
{
FindFloor(UpdatedComponent->GetComponentLocation(), CurrentFloor, false);
}

if (!CurrentFloor.IsWalkableFloor())
{
SetMovementMode(MOVE_Falling);
StartNewPhysics(deltaTime, Iterations);
return;
}
}
}

void UCharacterMovementComponent::MoveAlongFloor(
const FVector& InVelocity,
float DeltaSeconds,
FStepDownResult* OutStepDownResult)
{
if (!CurrentFloor.IsWalkableFloor())
{
return;
}
Paused: source breakpoint
Frames
UCharacterMovementComponent::PhysWalkingCharacterMovementComponent.cpp:35
UCharacterMovementComponent::PerformMovementCharacterMovementComponent.cpp:16
ACharacter::TickActorCharacter.cpp:12
FEngineLoop::TickLaunchEngineLoop.cpp:5000
PhysWalking
NameValueType
Locals
deltaTime0.0083333float
Iterations1int32
StepDownResult{bComputedFloor=true, FloorResult={...}}FStepDownResult