RealDocs

AActor::GetPlacementExtent

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

Description

Returns the bounding extent used when placing this actor in the editor, primarily to offset the actor from a hit surface so it doesn't clip into geometry.

Caveats & Gotchas

  • This method is only meaningful in editor contexts — at runtime the engine never calls it. Override it if your actor has unusual geometry that causes incorrect surface snapping when placed.
  • The default implementation derives the extent from the actor's collision components. If your actor has no collision at edit time (e.g. components added at runtime only), the returned extent will be zero and placement will snap to the exact hit point.

Signature

FVector GetPlacementExtent() const

Return Type

FVector

Example

Override to provide a custom placement offset C++
FVector AMyActor::GetPlacementExtent() const
{
    // Return a fixed half-height so the actor sits on surfaces cleanly
    return FVector(0.f, 0.f, 50.f);
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.