RealDocs

AActor::AddActorLocalTransform

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

Description

Applies a delta transform (offset + rotation + scale) to this actor in its local reference frame. Equivalent to combining AddActorLocalOffset and AddActorLocalRotation in one call.

Signature

void AddActorLocalTransform(const FTransform& NewTransform, bool bSweep=false, FHitResult* OutSweepHitResult=nullptr, ETeleportType Teleport = ETeleportType::None)

Parameters

Name Type Description Default
NewTransform const FTransform& The delta transform to apply in actor-local space. Location and rotation components are added; scale is multiplied.
bSweep bool Whether to sweep for blocking collision on the translation component of the delta. false
OutSweepHitResult FHitResult* Optional hit result populated when bSweep is true. nullptr
Teleport ETeleportType Whether to teleport physics state. ETeleportType::None

Return Type

void

Caveats & Gotchas

  • Scale in the delta transform is multiplied with the current scale, not added — passing a delta scale of (2,2,2) doubles the current scale.
  • For world-space deltas, use AddActorWorldTransform() instead.

Example

Move and rotate an actor along its local axes simultaneously C++
FTransform Delta(
    FRotator(0.f, 45.f, 0.f).Quaternion(),  // rotate 45 degrees yaw
    FVector(100.f, 0.f, 0.f),               // move 100 units forward in local space
    FVector::OneVector                       // no scale change
);
AddActorLocalTransform(Delta);

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.