AActor::GetActorScale3D
#include "GameFramework/Actor.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallableconst
Description
Returns the actor's world-space scale as an FVector with X, Y, and Z scale factors. This is the scale of the RootComponent in world space, not relative to any parent.
Caveats & Gotchas
- • Returns world-space scale, not the relative scale stored on the component. If the actor is attached to another actor with non-unit scale, these values will differ from what you set via SetActorRelativeScale3D.
- • Non-uniform scale (different X, Y, Z values) can cause unexpected results with physics simulation and collision shapes — keep scale uniform when physics is enabled.
Signature
ENGINE_API FVector GetActorScale3D() const; Return Type
FVector Examples
Check if the actor is at default scale (1,1,1) and print a message
Blueprint
Read scale and print each axis C++
FVector Scale = MyActor->GetActorScale3D();
UE_LOG(LogTemp, Log, TEXT("Scale: X=%.2f Y=%.2f Z=%.2f"), Scale.X, Scale.Y, Scale.Z); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?