AActor::CheckStillInWorld
#include "GameFramework/Actor.h"
Access: public
Specifiers: virtualENGINE_API
Description
Checks whether the actor is still within valid world bounds, including the KillZ plane and world boundary volumes, and handles the situation if not. Returns false if the actor was killed by a world boundary check.
Caveats & Gotchas
- • When the actor falls below KillZ, this function calls FellOutOfWorld(), not TakeDamage() — any damage-based death logic will be bypassed.
- • This is called automatically by the engine each tick for actors with bCheckEncroachmentOnMove; you should not need to call it manually in most cases.
- • KillZ is configured in World Settings. If your level has no floor and you rely on this as a fallback kill plane, make sure it is set to a reasonable value below the playable area.
Signature
ENGINE_API virtual bool CheckStillInWorld() Return Type
bool Example
Override to add custom out-of-world handling C++
bool AMyActor::CheckStillInWorld()
{
if (!Super::CheckStillInWorld())
{
// Actor was destroyed by a world boundary check
return false;
}
return true;
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?