Skip to content

Class URotationActuator

Class URotationActuator

  • Defined in File RotationActuator.h

Inheritance Relationships

Base Types

class URotationActuator : public UActorComponent, public IScholaActuator

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

Dependencies: FBoxPoint, FBoxSpaceDimension

Rotation actuator that applies rotation changes to an Actor.

Accepts a BoxPoint action where each dimension corresponds to Pitch, Yaw, or Roll rotation. Rotation can be applied as raw delta values or normalized [0,1] values that are rescaled.


Public Functions

SymbolDetails
GetActionSpace_ImplementationGet the action space for this actuator.
ConvertActionToFRotatorConvert a Box Point with values to an FRotator.
TakeAction_ImplementationApply a rotation action to the owner actor.
GenerateIdGenerate a unique ID string for this actuator.

GetActionSpace_Implementation

virtual void
GetActionSpace_Implementation(FInstancedStruct &OutActionSpace) const

Get the action space for this actuator.

Returns a BoxSpace with dimensions for each enabled rotation axis (Pitch, Yaw, Roll). If bNormalizeAndRescale is true, dimensions are [0,1], otherwise uses the configured bounds.

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

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

ConvertActionToFRotator

FRotator ConvertActionToFRotator(const FBoxPoint &Action)

Convert a Box Point with values to an FRotator.

Interprets the BoxPoint values as rotation angles for enabled dimensions. Applies rescaling if bNormalizeAndRescale is enabled.

Parameters

Action – [in] BoxPoint that will be converted

Returns:

FRotator equivalent to the converted BoxPoint

#DirectionNameTypeDescription
1Actionconst FBoxPoint &BoxPoint that will be converted

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

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

TakeAction_Implementation

virtual void TakeAction_Implementation(const FInstancedStruct &InAction)

Apply a rotation action to the owner actor.

Converts the action BoxPoint to a rotation delta and applies it to the owning actor’s local rotation.

Parameters

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

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

Attributes: virtual

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

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

GenerateId

FString GenerateId() const

Generate a unique ID string for this actuator.

Returns:

FString describing the actuator configuration (e.g., “Rotation_Pitch_-180.0_180.0_Yaw_-180.0_180.0”)

Attributes: const

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

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


Public Members

SymbolDetails
PitchBoundsThe Min/Max value for the Pitch of the tracked rotation (rotation around Y-axis)
RollBoundsThe Min/Max value for the Roll of the tracked rotation (rotation around X-axis)
YawBoundsThe Min/Max value for the Yaw of the tracked rotation (rotation around Z-axis)
bHasPitchToggle for whether this actuator rotates the Agent along the Pitch dimension.
bHasRollToggle for whether this actuator rotates the Agent along the Roll dimension.
bHasYawToggle for whether this actuator rotates the Agent along the Yaw dimension.
TeleportTypeType of teleportation to use.
bSweepToggle for whether to sweep while teleporting the actor.
bNormalizeAndRescaleToggle for whether to use a [0,1] scale that is then rescaled onto the whole range for each rotator.
OnRotationDelegateA delegate invoked when this actuator receives input from a brain.

PitchBounds

FBoxSpaceDimension PitchBounds = FBoxSpaceDimension(-180, 180)

The Min/Max value for the Pitch of the tracked rotation (rotation around Y-axis)


RollBounds

FBoxSpaceDimension RollBounds = FBoxSpaceDimension(-180, 180)

The Min/Max value for the Roll of the tracked rotation (rotation around X-axis)


YawBounds

FBoxSpaceDimension YawBounds = FBoxSpaceDimension(-180, 180)

The Min/Max value for the Yaw of the tracked rotation (rotation around Z-axis)


bHasPitch

bool bHasPitch = true

Toggle for whether this actuator rotates the Agent along the Pitch dimension.


bHasRoll

bool bHasRoll = true

Toggle for whether this actuator rotates the Agent along the Roll dimension.


bHasYaw

bool bHasYaw = true

Toggle for whether this actuator rotates the Agent along the Yaw dimension.


TeleportType

ETeleportType TeleportType = ETeleportType::None

Type of teleportation to use.

See SetActorLocation documentation for more details.


bSweep

bool bSweep

Toggle for whether to sweep while teleporting the actor.

See SetActorLocation documentation for more details.


bNormalizeAndRescale

bool bNormalizeAndRescale = false

Toggle for whether to use a [0,1] scale that is then rescaled onto the whole range for each rotator.

Otherwise, uses the raw output as the delta rotation.


OnRotationDelegate

FOnRotationInputSignature OnRotationDelegate

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

Useful for debugging and logging.