Skip to content

Class UTeleportActuator

Class UTeleportActuator

  • Defined in File TeleportActuator.h

Inheritance Relationships

Base Types

class UTeleportActuator : public UActorComponent, public IScholaActuator

Source: Source/Schola/Interactors/Public/Actuators/TeleportActuator.h

Dependencies: FMultiDiscretePoint, IScholaActuator

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.


Public Functions

SymbolDetails
GetActionSpace_ImplementationGet the action space for this actuator.
TakeAction_ImplementationApply a teleport action to the owner actor.
GenerateIdGenerate a unique ID string for this actuator.
TakeActionTyped convenience method for taking action with a MultiDiscretePoint directly.

GetActionSpace_Implementation

virtual void
GetActionSpace_Implementation(FInstancedStruct &OutActionSpace) const override

Get the action space for this actuator.

Returns a MultiDiscreteSpace with dimensions based on enabled direction flags. Each dimension represents the available movements (None/Forward/Backward) for axes that have at least one direction enabled via bitflags.

Parameters

OutActionSpace – [out] The action space definition to be populated

#DirectionNameTypeDescription
1OutActionSpaceFInstancedStruct &The action space definition to be populated

Attributes: const, virtual

Source: Source/Schola/Interactors/Public/Actuators/TeleportActuator.h

Implementation: Source/Schola/Interactors/Private/Actuators/TeleportActuator.cpp

TakeAction_Implementation

virtual void
TakeAction_Implementation(const FInstancedStruct &InAction) override

Apply a teleport action to the owner actor.

Converts the MultiDiscretePoint action to a position delta and applies it.

Parameters

InAction – [in] The action to apply (MultiDiscretePoint)

#DirectionNameTypeDescription
1InActionconst FInstancedStruct &The action to apply (MultiDiscretePoint)

Attributes: virtual

Source: Source/Schola/Interactors/Public/Actuators/TeleportActuator.h

Implementation: Source/Schola/Interactors/Private/Actuators/TeleportActuator.cpp

GenerateId

FString GenerateId() const

Generate a unique ID string for this actuator.

Returns:

FString describing the actuator configuration (e.g., “Teleport_X_100.00_Y_0.00_Z_0.00”)

Attributes: const

Source: Source/Schola/Interactors/Public/Actuators/TeleportActuator.h

Implementation: Source/Schola/Interactors/Private/Actuators/TeleportActuator.cpp

TakeAction

void TakeAction(const FMultiDiscretePoint &ActionPoint)

Typed convenience method for taking action with a MultiDiscretePoint directly.

Parameters

ActionPoint – [in] The multi-discrete action containing movement directions for each enabled axis

#DirectionNameTypeDescription
1ActionPointconst FMultiDiscretePoint &The multi-discrete action containing movement directions for each enabled axis

Source: Source/Schola/Interactors/Public/Actuators/TeleportActuator.h

Implementation: Source/Schola/Interactors/Private/Actuators/TeleportActuator.cpp


Public Members

SymbolDetails
XMovementDirectionFlagsBitflags to enable positive/negative X translation.
XStepStep distance along local X when action digit selects Forward/Backward.
YMovementDirectionFlagsBitflags to enable positive/negative Y translation.
YStepStep distance along local Y when action digit selects Forward/Backward.
ZMovementDirectionFlagsBitflags to enable positive/negative Z translation.
ZStepStep distance along local Z when action digit selects Forward/Backward.
TeleportTypeType of teleportation (passed to SetActorLocation).
bSweepWhether to sweep when moving.
OnTeleportDelegateBroadcast after applying a teleport delta.

Var

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

Bitflags to enable positive/negative X translation.


XStep

float XStep = 100.f

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

Var

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

Bitflags to enable positive/negative Y translation.


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).

Determines physics behavior during movement.


bSweep

bool bSweep = false

Whether to sweep when moving.

If true, the actor will check for collisions during movement.


OnTeleportDelegate

FOnTeleportComponentSignature OnTeleportDelegate

Broadcast after applying a teleport delta.

Useful for debugging and logging.


Protected Functions

SymbolDetails
ConvertActionToVectorConvert a MultiDiscretePoint action to a world-space movement vector.
DimensionValueCalculate the movement distance for a single axis based on discrete action.

ConvertActionToVector

FVector ConvertActionToVector(const FMultiDiscretePoint &ActionPoint) const

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

Interprets each discrete action value as None/Forward/Backward and scales by the step distances.

Parameters

ActionPoint – [in] The action to convert

Returns:

FVector containing the movement delta

#DirectionNameTypeDescription
1ActionPointconst FMultiDiscretePoint &The action to convert

Attributes: const

Source: Source/Schola/Interactors/Public/Actuators/TeleportActuator.h

Implementation: Source/Schola/Interactors/Private/Actuators/TeleportActuator.cpp

DimensionValue

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

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

Parameters

  • Step – [in] The step distance configured for this axis

  • DimensionFlags – [in] The bitflags for this dimension indicating which directions are enabled

  • Digit – [in] The discrete action index (0-based) into the set bits of DimensionFlags

Returns:

float The signed movement distance

#DirectionNameTypeDescription
1StepfloatThe step distance configured for this axis
2DimensionFlagsuint8The bitflags for this dimension indicating which directions are enabled
3DigitintThe discrete action index (0-based) into the set bits of DimensionFlags

Attributes: const

Source: Source/Schola/Interactors/Public/Actuators/TeleportActuator.h

Implementation: Source/Schola/Interactors/Private/Actuators/TeleportActuator.cpp