RealDocs

AActor::ActorToWorld

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

Description

Returns the local-to-world transform of the actor's RootComponent. Identical to GetTransform() — this is the lower-level name used throughout engine source.

Signature

inline const FTransform& ActorToWorld() const

Return Type

const FTransform&

Caveats & Gotchas

  • Returns FTransform::Identity if the actor has no RootComponent.
  • Prefer GetActorTransform() (Blueprint) or GetTransform() (C++) for readability — ActorToWorld() is the same computation but less discoverable.

Example

Use in a component to get the owning actor's world transform C++
FTransform WorldTM = GetOwner()->ActorToWorld();
FVector WorldOrigin = WorldTM.GetLocation();
FQuat   WorldRot    = WorldTM.GetRotation();

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.