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 IScholaActuatorMethods
Public
GetActionSpace_Implementation
virtual voidGetActionSpace_Implementation(FInstancedStruct &OutActionSpace) const overrideGet the action space for this actuator.
Parameters
OutActionSpace(FInstancedStruct)
TakeAction_Implementation
virtual voidTakeAction_Implementation(const FInstancedStruct &InAction) overrideApply a teleport action to the owner actor.
Parameters
InAction(const FInstancedStruct)
GenerateId
FString GenerateId() constGenerate 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) constConvert a MultiDiscretePoint action to a world-space movement vector.
Parameters
ActionPoint(const FMultiDiscretePoint)
DimensionValue
float DimensionValue(float Step, uint8 DimensionFlags, int Digit) constCalculate 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.fStep 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.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).
bSweep
bool bSweep = falseWhether to sweep when moving.
OnTeleportDelegate
FOnTeleportComponentSignature OnTeleportDelegateBroadcast after applying a teleport delta.
Source: Source/ScholaInteractors/Public/Actuators/TeleportActuator.h