AActor::SetActorRelativeScale3D
#include "GameFramework/Actor.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Sets the actor's RootComponent scale relative to its parent. When the actor is not attached, this is equivalent to SetActorScale3D.
Caveats & Gotchas
- • Non-uniform scale (different X, Y, Z values) can cause rendering artefacts and unexpected collision shapes, especially with skeletal meshes and physics assets. Keep scale uniform when possible.
- • Scale is applied to the RootComponent's RelativeScale3D — if child components have their own scale, the final world scale is the product of all scales in the hierarchy.
Signature
ENGINE_API void SetActorRelativeScale3D(FVector NewRelativeScale); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| NewRelativeScale | FVector | The new scale to apply to the actor's RootComponent relative to its parent. | — |
Return Type
void Examples
Scale an actor to half size relative to its parent on BeginPlay
Blueprint
Halve an actor's size relative to its parent C++
MyActor->SetActorRelativeScale3D(FVector(0.5f, 0.5f, 0.5f)); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?