unreal.RotationArrayAction

class unreal.RotationArrayAction(outer: Object | None = None, name: Name | str = 'None')

Bases: LearningAgentsAction

An array of rotation actions.

C++ Source:

  • Plugin: LearningAgents

  • Module: LearningAgents

  • File: LearningAgentsActions.h

Editor Properties: (see get_editor_property/set_editor_property)

  • interactor (LearningAgentsInteractor): [Read-Only] Reference to the Interactor this action is associated with.

classmethod add_rotation_array_action(interactor, name='None', rotation_num=1, scale=180.000000) RotationArrayAction

Adds a new rotation array action to the given agent interactor. Call during ULearningAgentsInteractor::SetupActions event.

Parameters:
  • interactor (LearningAgentsInteractor) – The agent interactor to add this action to.

  • name (Name) – The name of this new action. Used for debugging.

  • rotation_num (int32) – The number of rotations in the array.

  • scale (float) – Used to normalize the data for the action.

Returns:

The newly created action.

Return type:

RotationArrayAction

get_rotation_array_action(agent_id=-1) Array[Rotator]

Gets the data for this action as rotators. Call during ULearningAgentsInteractor::GetActions event.

Parameters:

agent_id (int32) – The agent id to get data for.

Returns:

out_rotations (Array[Rotator]): The current action values.

Return type:

Array[Rotator]

get_rotation_array_action_as_quats(agent_id=-1) Array[Quat]

Gets the data for this action as quaternions. Call during ULearningAgentsInteractor::GetActions event.

Parameters:

agent_id (int32) – The agent id to get data for.

Returns:

out_rotations (Array[Quat]): The current action values.

Return type:

Array[Quat]

get_rotation_array_action_as_rotation_vectors(agent_id=-1) Array[Vector]

Gets the data for this action as rotation vectors. Call during ULearningAgentsInteractor::GetActions event.

Parameters:

agent_id (int32) – The agent id to get data for.

Returns:

out_rotation_vectors (Array[Vector]): The current action values.

Return type:

Array[Vector]