Class UTeleportActuator
Class UTeleportActuator
- Defined in File TeleportActuator.h
Inheritance Relationships
Base Types
-
public UActorComponent -
public IScholaActuator(Class IScholaActuator)
class UTeleportActuator : public UActorComponent, public IScholaActuatorSource: 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
| Symbol | Details |
|---|---|
GetActionSpace_Implementation | Get the action space for this actuator. |
TakeAction_Implementation | Apply a teleport action to the owner actor. |
GenerateId | Generate a unique ID string for this actuator. |
TakeAction | Typed convenience method for taking action with a MultiDiscretePoint directly. |
GetActionSpace_Implementation
virtual voidGetActionSpace_Implementation(FInstancedStruct &OutActionSpace) const overrideGet 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
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | OutActionSpace | FInstancedStruct & | 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 voidTakeAction_Implementation(const FInstancedStruct &InAction) overrideApply 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)
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | InAction | const 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() constGenerate 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
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | ActionPoint | const 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
| Symbol | Details |
|---|---|
XMovementDirectionFlags | Bitflags to enable positive/negative X translation. |
XStep | Step distance along local X when action digit selects Forward/Backward. |
YMovementDirectionFlags | Bitflags to enable positive/negative Y translation. |
YStep | Step distance along local Y when action digit selects Forward/Backward. |
ZMovementDirectionFlags | Bitflags to enable positive/negative Z translation. |
ZStep | Step distance along local Z when action digit selects Forward/Backward. |
TeleportType | Type of teleportation (passed to SetActorLocation). |
bSweep | Whether to sweep when moving. |
OnTeleportDelegate | Broadcast 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.fStep 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.fStep distance along local Y when action digit selects Forward/Backward.
ZMovementDirectionFlags
uint8 ZMovementDirectionFlags = 0Bitflags to enable positive/negative Z translation.
ZStep
float ZStep = 0.fStep distance along local Z when action digit selects Forward/Backward.
TeleportType
ETeleportType TeleportType = ETeleportType::NoneType of teleportation (passed to SetActorLocation).
Determines physics behavior during movement.
bSweep
bool bSweep = falseWhether to sweep when moving.
If true, the actor will check for collisions during movement.
OnTeleportDelegate
FOnTeleportComponentSignature OnTeleportDelegateBroadcast after applying a teleport delta.
Useful for debugging and logging.
Protected Functions
| Symbol | Details |
|---|---|
ConvertActionToVector | Convert a MultiDiscretePoint action to a world-space movement vector. |
DimensionValue | Calculate the movement distance for a single axis based on discrete action. |
ConvertActionToVector
FVector ConvertActionToVector(const FMultiDiscretePoint &ActionPoint) constConvert 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
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | ActionPoint | const 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) constCalculate 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
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | Step | float | The step distance configured for this axis |
| 2 | — | DimensionFlags | uint8 | The bitflags for this dimension indicating which directions are enabled |
| 3 | — | Digit | int | The 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