RealDocs

AActor::K2_TeleportTo

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

Description

Moves this actor to the specified location and rotation, attempting to avoid overlapping geometry by nudging slightly out of walls. Returns false if the actor could not fit at the destination.

Caveats & Gotchas

  • Unlike SetActorLocation, TeleportTo sweeps for valid placement and tries to push the actor out of blocking geometry — it may place the actor at a slightly different position than requested if the exact spot is blocked.
  • For characters with a movement component, prefer calling ACharacter::TeleportTo or using the movement component's safe teleport path; raw K2_TeleportTo bypasses movement component state which can cause physics/velocity artifacts.
  • The return value is frequently ignored in practice but is critical in gameplay-critical code — if false, the actor may still be at its old location.

Signature

ENGINE_API bool K2_TeleportTo( FVector DestLocation, FRotator DestRotation );

Parameters

Name Type Description Default
DestLocation FVector The target world location to teleport to.
DestRotation FRotator The target world rotation at the destination.

Return Type

bool

Examples

Teleport self to a fixed world location and rotation on BeginPlay Blueprint
Event BeginPlay Teleport To Target is Actor Target Dest Location Dest Rotation Return Value Make Vector X 500.0 Y 200.0 Z 100.0 Return Value Return Value Make Rotator Pitch 0.0 Yaw 90.0 Roll 0.0 Return Value Return Value
Edit Blueprint graph Teleport self to a fixed world location and rotation on BeginPlay
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
Teleport an actor to a spawn point C++
AActor* SpawnPoint = GetSpawnPoint();
if (SpawnPoint)
{
    bool bSuccess = MyActor->K2_TeleportTo(
        SpawnPoint->GetActorLocation(),
        SpawnPoint->GetActorRotation()
    );
    if (!bSuccess)
    {
        UE_LOG(LogGame, Warning, TEXT("Teleport failed — destination blocked"));
    }
}

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.