Skip to content

UTeleportActuator

Teleport actuator that applies discrete position changes to an Actor.

Implements IScholaActuator directly as a component without additional base classes. Exposes a MultiDiscrete action space based on enabled translation directions (X,Y,Z). Each dimension uses bitflags to independently enable Positive and/or Negative movement. Actions move the actor by the configured step distance in the allowed directions.

class UTeleportActuator : public UActorComponent, public IScholaActuator

Methods

Public

GetActionSpace_Implementation

virtual void
GetActionSpace_Implementation(FInstancedStruct &OutActionSpace) const override

Get the action space for this actuator.

Parameters

  • OutActionSpace (FInstancedStruct)

TakeAction_Implementation

virtual void
TakeAction_Implementation(const FInstancedStruct &InAction) override

Apply a teleport action to the owner actor.

Parameters

  • InAction (const FInstancedStruct)

GenerateId

FString GenerateId() const

Generate a unique ID string for this actuator.


TakeAction

void TakeAction(const FMultiDiscretePoint &ActionPoint)

Typed convenience method for taking action with a MultiDiscretePoint directly.

Parameters

  • ActionPoint (const FMultiDiscretePoint)

Protected

ConvertActionToVector

FVector ConvertActionToVector(const FMultiDiscretePoint &ActionPoint) const

Convert a MultiDiscretePoint action to a world-space movement vector.

Parameters

  • ActionPoint (const FMultiDiscretePoint)

DimensionValue

float DimensionValue(float Step, uint8 DimensionFlags, int Digit) const

Calculate the movement distance for a single axis based on discrete action.

Parameters

  • Step (float)

  • DimensionFlags (uint8)

  • Digit (int)

Attributes

XMovementDirectionFlags

uint8 XMovementDirectionFlags =
static_cast<uint8>(ETeleportDimensionFlags::Forwards) |
static_cast<uint8>(ETeleportDimensionFlags::Backwards)

Bitflags to enable positive/negative X translation.

Parameters

  • static_cast<uint8>(ETeleportDimensionFlags::Backwards (ETeleportDimensionFlags::Forwards) |)

XStep

float XStep = 100.f

Step distance along local X when action digit selects Forward/Backward.


YMovementDirectionFlags

uint8 YMovementDirectionFlags =
static_cast<uint8>(ETeleportDimensionFlags::Forwards) |
static_cast<uint8>(ETeleportDimensionFlags::Backwards)

Bitflags to enable positive/negative Y translation.

Parameters

  • static_cast<uint8>(ETeleportDimensionFlags::Backwards (ETeleportDimensionFlags::Forwards) |)

YStep

float YStep = 0.f

Step distance along local Y when action digit selects Forward/Backward.


ZMovementDirectionFlags

uint8 ZMovementDirectionFlags = 0

Bitflags to enable positive/negative Z translation.


ZStep

float ZStep = 0.f

Step distance along local Z when action digit selects Forward/Backward.


TeleportType

ETeleportType TeleportType = ETeleportType::None

Type of teleportation (passed to SetActorLocation).


bSweep

bool bSweep = false

Whether to sweep when moving.


OnTeleportDelegate

FOnTeleportComponentSignature OnTeleportDelegate

Broadcast after applying a teleport delta.

Source: Source/ScholaInteractors/Public/Actuators/TeleportActuator.h