RealDocs

AActor::SetLODParent

function Engine Since 4.14
#include "GameFramework/Actor.h"
Access: public

Description

Assigns an HLOD proxy component as the LOD parent for all of this actor's primitive components, hiding them when the proxy is shown at distance.

Caveats & Gotchas

  • Propagates to all UPrimitiveComponent children; calling it mid-game with null effectively removes HLOD culling from the actor, which can cause both the actor and its proxy to render simultaneously if timing is wrong.
  • InParentDrawDistance directly sets MinDrawDistance on each primitive component. Setting it too aggressively will pop this actor out of view earlier than expected, which is visible in slow-moving cameras.

Signature

ENGINE_API void SetLODParent(class UPrimitiveComponent* InLODParent, float InParentDrawDistance);

Parameters

Name Type Description Default
InLODParent UPrimitiveComponent* The HLOD proxy component (usually on an ALODActor) that will replace this actor's components at distance. Pass null to clear.
InParentDrawDistance float The draw distance of the LOD parent, used to set MinDrawDistance on this actor's components.

Return Type

void

Example

Assigning an HLOD parent from an ALODActor C++
// Typically called by ALODActor::SetSubActors during HLOD level streaming:
for (AActor* SubActor : SubActors)
{
    SubActor->SetLODParent(StaticMeshComponent, LODDrawDistance);
}

Version History

Introduced in: 4.14

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.