RealDocs

AActor::GetActorRelativeScale3D

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

Description

Returns the actor's RootComponent scale relative to its parent actor. When the actor has no parent, this equals the world-space scale.

Caveats & Gotchas

  • Returns relative scale, not world scale. If the parent has a scale of (2,2,2) and this actor's relative scale is (0.5,0.5,0.5), the world scale is (1,1,1) — use GetActorScale3D to get the world-space result.
  • This reads RelativeScale3D from the RootComponent directly. If the RootComponent is null (actor with no root), calling this will crash.

Signature

ENGINE_API FVector GetActorRelativeScale3D() const;

Return Type

FVector

Examples

Grow the actor 50% by multiplying its relative scale on BeginPlay Blueprint
Event BeginPlay Set Actor Relative Scale 3D Target is Scene Component Target New Relative Scale 3D New Relative Scale 3D Get Actor Relative Scale 3D Target is Actor Return Value FVector * Float A B 1.5 Return Value Return Value
Edit Blueprint graph Grow the actor 50% by multiplying its relative scale on BeginPlay
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
Log relative vs world scale for debugging C++
FVector RelScale = MyActor->GetActorRelativeScale3D();
FVector WorldScale = MyActor->GetActorScale3D();
UE_LOG(LogTemp, Log, TEXT("Relative: %s  World: %s"), *RelScale.ToString(), *WorldScale.ToString());

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.