RealDocs

AActor::GetTransform

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

Description

Returns the actor-to-world transform of the RootComponent. This is the full combined translation, rotation, and scale of the actor in world space.

Caveats & Gotchas

  • Returns a reference to the internal component transform — do not store the reference across frames; retrieve it fresh each time or copy the value with FTransform Copy = GetTransform().
  • If the actor has no RootComponent, the function returns FTransform::Identity, which silently produces world-origin results. Always check that the actor is properly set up if getting unexpected zero transforms.

Signature

const FTransform& GetTransform() const

Return Type

const FTransform&

Examples

Spawn a projectile at the actor's current world transform Blueprint
Event BeginPlay Spawn Actor from Class Class BP_MyProjectile BP_MyProjectile Spawn Transform Collision Handling Override Collision Handling Override AlwaysSpawn AlwaysSpawn Return Value Get Transform Target is Actor Return Value Return Value
Edit Blueprint graph Spawn a projectile at the actor's current world transform
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
Spawn a projectile at actor transform C++
FTransform SpawnTM = GetTransform();
AMyProjectile* Proj = GetWorld()->SpawnActor<AMyProjectile>(ProjectileClass, SpawnTM);

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.