UCharacterMovementComponent::StartFalling
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: virtual
Description
Transitions the character from walking to falling mid-substep, recomputing remaining time proportionally to how much of the intended movement wasn't consumed, then continues the physics loop via StartNewPhysics().
Caveats & Gotchas
- • In-editor before the world has begun play (or within the first second of PIE), it skips setting MOVE_Falling and instead forces bForceNextFloorCheck — a guard against characters falling out of the world before streaming/collision has settled.
- • Only sets MOVE_Falling if IsMovingOnGround() is still true when this is called; if something else already changed the movement mode, this call won't override it.
- • This is an internal step of PhysWalking's iteration loop, not something to call directly to make a character fall — use SetMovementMode(MOVE_Falling) for that.
Signature
virtual void StartFalling(int32 Iterations, float remainingTime, float timeTick, const FVector& Delta, const FVector& subLoc) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Iterations | int32 | Current sub-step iteration count for the movement update. | — |
| remainingTime | float | Time left in this movement update before StartFalling was reached. | — |
| timeTick | float | Duration of the current sub-step. | — |
| Delta | const FVector& | Movement delta that was originally desired for this sub-step. | — |
| subLoc | const FVector& | Location at the start of this sub-step, used to measure how much of Delta was actually consumed. | — |
Return Type
void Example
Reacting to a fall transition C++
void UMyCharacterMovementComponent::StartFalling(int32 Iterations, float remainingTime, float timeTick, const FVector& Delta, const FVector& subLoc)
{
OnStartedFalling.Broadcast();
Super::StartFalling(Iterations, remainingTime, timeTick, Delta, subLoc);
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?