ACharacter::LandedDelegate
#include "GameFramework/Character.h"
Access: public
Specifiers: UPROPERTYBlueprintAssignable
Description
Multicast delegate broadcast when the character lands after being in the Falling movement mode. The delegate payload includes the FHitResult describing the surface that was hit.
Caveats & Gotchas
- • At the moment this delegate fires, the movement mode is still Falling — it has not yet transitioned to Walking. If you need to act after the mode switches, bind to MovementModeChangedDelegate instead.
- • The delegate fires on both server and owning client in a networked game, but not on simulated proxies. Landing visual/audio effects for other players must be handled through replication or a multicast RPC.
Signature
FLandedSignature LandedDelegate; Examples
Bind a custom event to LandedDelegate to react when the character lands
Blueprint
Apply fall damage on landing C++
void AMyCharacter::BeginPlay()
{
Super::BeginPlay();
LandedDelegate.AddDynamic(this, &AMyCharacter::OnLanded);
}
void AMyCharacter::OnLanded(const FHitResult& Hit)
{
float FallSpeed = FMath::Abs(GetVelocity().Z);
if (FallSpeed > FallDamageThreshold)
{
float Damage = (FallSpeed - FallDamageThreshold) * FallDamageScale;
TakeDamage(Damage, FDamageEvent(), nullptr, nullptr);
}
} Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?