RealDocs

AActor::GetActorTransform

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

Description

Returns the full world-space transform (location, rotation, scale) of the actor's root component as an FTransform. More efficient than querying location, rotation, and scale separately when you need more than one.

Signature

const FTransform& GetActorTransform() const

Return Type

const FTransform&

Caveats & Gotchas

  • Returns the transform of the root component. Actors without a root component return the identity transform.
  • Returns a const reference into the component's transform cache. Do not store the reference — copy the FTransform if you need to keep it past the current frame.
  • For physics-simulated actors, the transform may be one frame behind the physics simulation. Read from the physics body directly via GetBodyInstance() if sub-frame accuracy is required.

Example

Copying transform to another actor C++
FTransform T = SourceActor->GetActorTransform();
TargetActor->SetActorTransform(T);

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.