AActor::AddActorWorldTransformKeepScale
#include "GameFramework/Actor.h"
Access: public
Description
Applies a delta transform to this actor in world space while preserving the actor's existing scale. Unlike AddActorWorldTransform, the scale is not reset to (1,1,1).
Caveats & Gotchas
- • The scale component inside DeltaTransform is not applied — only rotation and translation from the delta are used. The actor's current scale remains unchanged.
- • This method was added specifically to address the silent scale-clobbering behavior of AddActorWorldTransform. Prefer it whenever the actor uses non-uniform or designer-set scale values.
- • Like all AddActor* methods, this operates in world space. For parent-relative movement use SetActorRelativeLocation / SetActorRelativeTransform.
Signature
ENGINE_API void AddActorWorldTransformKeepScale(const FTransform& DeltaTransform, bool bSweep = false, FHitResult* OutSweepHitResult = nullptr, ETeleportType Teleport = ETeleportType::None) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| DeltaTransform | const FTransform& | The transform delta to apply in world space. Scale component is not applied; existing actor scale is preserved. | — |
| bSweep | bool | If true, sweeps to the new position and stops at blocking geometry. | false |
| OutSweepHitResult | FHitResult* | If provided and sweep is enabled, receives the blocking hit result. | nullptr |
| Teleport | ETeleportType | Whether to teleport physics state or update velocity. | ETeleportType::None |
Return Type
void Example
Apply a world-space transform delta without touching scale C++
FTransform Delta(FQuat::Identity, FVector(100.f, 0.f, 0.f));
AddActorWorldTransformKeepScale(Delta); Tags
Version History
Introduced in: 4.17
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?