AActor::IsRootComponentStationary
#include "GameFramework/Actor.h"
Access: public
Description
Returns true if the actor's root component has a mobility of EComponentMobility::Stationary — cannot move, but can change lighting state at runtime.
Caveats & Gotchas
- • Returns false if the actor has no root component. The distinction between Static and Stationary matters for lighting: Static bakes both direct and indirect light; Stationary bakes indirect only and uses dynamic shadows for direct.
- • Stationary lights have a four-overlapping-light limit per scene cluster. Checking this at runtime has no effect on that limit; it is purely informational.
Signature
ENGINE_API bool IsRootComponentStationary() const; Return Type
bool Example
Branching behaviour by mobility type C++
if (IsRootComponentStationary())
{
// Actor never moves; safe to cache its world location once
CachedLocation = GetActorLocation();
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?