RealDocs

ACharacter::Landed

function Engine Since 4.0
#include "GameFramework/Character.h"
Access: public Specifiers: virtual

Description

Called by CharacterMovementComponent when the character lands after being airborne. Override this to react to landing in C++; it also fires the OnLanded Blueprint event and the LandedDelegate multicast.

Caveats & Gotchas

  • The movement mode is still EMovementMode::MOVE_Falling when this is called — if you need to react after the mode switches to Walking, use OnMovementModeChanged() instead.
  • Current Velocity at the time of the call reflects the falling velocity at impact, not the post-landing velocity. Cache it here if you need it for fall-damage calculations.
  • Always call Super::Landed(Hit) in overrides; skipping it prevents OnLanded Blueprint event and LandedDelegate from broadcasting.

Signature

virtual void Landed(const FHitResult& Hit)

Parameters

Name Type Description Default
Hit const FHitResult& Hit result describing the surface the character landed on.

Return Type

void

Example

Applying fall damage based on landing speed C++
void AMyCharacter::Landed(const FHitResult& Hit)
{
    Super::Landed(Hit);
    float FallSpeed = FMath::Abs(GetVelocity().Z);
    if (FallSpeed > FatalFallSpeed)
    {
        TakeDamage(FallSpeed * FallDamageMultiplier, FDamageEvent(), nullptr, nullptr);
    }
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.