AActor::FellOutOfWorld
#include "GameFramework/Actor.h"
Access: public
Specifiers: virtual
Description
Called when the actor falls below the world's KillZ threshold or exits the hard world bounds. The default implementation destroys the actor.
Caveats & Gotchas
- • The default implementation calls Destroy() immediately. If you override this without calling Super::, you take full responsibility for removing the actor — failing to do so will leave an invisible actor perpetually below the world.
- • The damage type passed in is determined by the WorldSettings KillZDamageType, which defaults to UDamageType. You can change it per-level in WorldSettings to trigger specific death effects.
Signature
virtual void FellOutOfWorld(const class UDamageType& dmgType) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| dmgType | const class UDamageType& | The damage type applied when the actor fell out of the world (e.g. kill-Z damage). | — |
Return Type
void Example
Respawn actor instead of destroying on kill-Z C++
void AMyPawn::FellOutOfWorld(const UDamageType& dmgType)
{
// Do not call Super — we handle cleanup ourselves
SetActorLocation(SpawnLocation);
SetActorEnableCollision(true);
Health = MaxHealth;
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?