RealDocs

AActor::TeleportSucceeded

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

Description

Called from TeleportTo() after a teleport completes successfully. Override this to react to the actor having been teleported, such as playing an effect or notifying components.

Caveats & Gotchas

  • The default implementation is empty — you must call Super::TeleportSucceeded() if you override it only as a best practice; there is nothing in the base to execute, but it maintains forward-compatibility.
  • bIsATest=true means the teleport was a probe movement (e.g. AI testing navmesh clearance) — do not play sound or visual effects when this flag is true.
  • This is called even for zero-distance teleports where the actor did not visually move. Check the new vs old location yourself if you need to distinguish real teleports from no-ops.

Signature

virtual void TeleportSucceeded(bool bIsATest)

Parameters

Name Type Description Default
bIsATest bool True if the teleport was a test movement (e.g. AI pathfinding probe) that should not trigger gameplay notifications.

Return Type

void

Example

Play a teleport effect when the actor is teleported C++
void AMyActor::TeleportSucceeded(bool bIsATest)
{
    Super::TeleportSucceeded(bIsATest);
    if (!bIsATest && TeleportEffect)
    {
        UGameplayStatics::SpawnEmitterAtLocation(GetWorld(), TeleportEffect, GetActorLocation());
    }
}

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.