Skip to content

Class UMovementInputActuator

Class UMovementInputActuator

  • Defined in File MovementInputActuator.h

Inheritance Relationships

Base Types

class UMovementInputActuator : public UActorComponent, public IScholaActuator

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

Dependencies: FBoxPoint

Movement input actuator that applies continuous movement to a Pawn.

Uses AddMovementInput to apply movement along enabled axes (X, Y, Z). Accepts a BoxPoint action where each dimension corresponds to forward/right/up movement speed.


Public Functions

SymbolDetails
GetActionSpace_ImplementationGet the action space for this actuator.
TakeAction_ImplementationApply an action to this actuator.
TakeActionTyped convenience method for taking action with a BoxPoint directly.
GenerateIdGenerate a unique ID string for this actuator.

GetActionSpace_Implementation

virtual void
GetActionSpace_Implementation(FInstancedStruct &OutActionSpace) const override

Get the action space for this actuator.

Returns a BoxSpace with dimensions for each enabled axis (X, Y, Z). Each dimension is bounded by [MinSpeed, MaxSpeed].

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/MovementInputActuator.h

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

TakeAction_Implementation

virtual void
TakeAction_Implementation(const FInstancedStruct &InAction) override

Apply an action to this actuator.

Accepts either a BoxPoint directly or extracts it from a DictPoint. The action values are interpreted as movement speeds along enabled axes.

Parameters

InAction – [in] The action to apply (BoxPoint or DictPoint)

#DirectionNameTypeDescription
1InActionconst FInstancedStruct &The action to apply (BoxPoint or DictPoint)

Attributes: virtual

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

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

TakeAction

void TakeAction(const FBoxPoint &Action)

Typed convenience method for taking action with a BoxPoint directly.

Parameters

Action – [in] The box point containing movement values for enabled dimensions

#DirectionNameTypeDescription
1Actionconst FBoxPoint &The box point containing movement values for enabled dimensions

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

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

GenerateId

FString GenerateId() const

Generate a unique ID string for this actuator.

Returns:

FString describing the actuator configuration (e.g., “MovementInput_X_true_Y_true_Z_false_Min_-1.00_Max_1.00”)

Attributes: const

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

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


Public Members

SymbolDetails
bHasXDimensionToggle for whether this actuator moves the Agent along the X dimension (forward/backward)
bHasYDimensionToggle for whether this actuator moves the Agent along the Y dimension (left/right)
bHasZDimensionToggle for whether this actuator moves the Agent along the Z dimension (up/down)
MinSpeedThe minimum speed at which the agent can move.
MaxSpeedThe maximum speed at which the agent can move.
ScaleValueScale to apply to input.
bForceForce the Pawn to move.
OnMovementDelegateA delegate invoked when this actuator receives input from a brain.

bHasXDimension

bool bHasXDimension = true

Toggle for whether this actuator moves the Agent along the X dimension (forward/backward)


bHasYDimension

bool bHasYDimension = true

Toggle for whether this actuator moves the Agent along the Y dimension (left/right)


bHasZDimension

bool bHasZDimension = true

Toggle for whether this actuator moves the Agent along the Z dimension (up/down)


MinSpeed

float MinSpeed = 0.0f

The minimum speed at which the agent can move.

Set to negative to allow for backwards movement along each axis.


MaxSpeed

float MaxSpeed = 1.0f

The maximum speed at which the agent can move.

Defines the upper bound of the action space.


ScaleValue

float ScaleValue = 1.0f

Scale to apply to input.

See AddMovementInput for more details.


bForce

bool bForce = false

Force the Pawn to move.

See AddMovementInput for more details.


OnMovementDelegate

FOnMovementInputSignature OnMovementDelegate

A delegate invoked when this actuator receives input from a brain.

Useful for debugging and logging.


Protected Functions

SymbolDetails
ConvertActionToFVectorConvert a Box Point to an FVector for movement input.

ConvertActionToFVector

FVector ConvertActionToFVector(const FBoxPoint &Action) const

Convert a Box Point to an FVector for movement input.

Extracts values from the BoxPoint based on enabled dimensions and maps them to X, Y, Z components.

Parameters

Action – [in] BoxPoint that will be converted

Returns:

FVector containing the converted movement values

#DirectionNameTypeDescription
1Actionconst FBoxPoint &BoxPoint that will be converted

Attributes: const

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

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