unreal.ProjectionHelper

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

Bases: LearningAgentsHelper

A helper for projecting onto surfaces.

C++ Source:

  • Plugin: LearningAgents

  • Module: LearningAgents

  • File: LearningAgentsHelpers.h

Editor Properties: (see get_editor_property/set_editor_property)

  • manager_component (LearningAgentsManagerComponent): [Read-Only] Reference to the Manager Component this helper is associated with.

classmethod add_projection_helper(manager_component, name='None') ProjectionHelper

Adds a new projection helper to the given manager component.

Parameters:
  • manager_component (LearningAgentsManagerComponent) – The manager component to add this helper to (such as an Interactor or Trainer).

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

Returns:

The newly created helper.

Return type:

ProjectionHelper

project_position_rotation_onto_ground_plane(agent_id=-1, position, rotation, local_forward_vector=[1.000000, 0.000000, 0.000000]) -> (out_position=Vector, out_rotation=Rotator)

Projects a position and rotation onto the zero height ground plane resulting in translation only in XY and rotation only around the Z.

Parameters:
  • agent_id (int32) – The agent id to run the helper for.

  • position (Vector) – The input position.

  • rotation (Rotator) – The input rotation.

  • local_forward_vector (Vector) – The local forward direction.

Returns:

out_position (Vector): The output projected position.

out_rotation (Rotator): The output projected rotation.

Return type:

tuple

project_transform_onto_ground_plane(agent_id=-1, transform, local_forward_vector=[1.000000, 0.000000, 0.000000]) Transform

Projects a transform onto the zero height ground plane resulting in translation only in XY and rotation only around the Z.

Parameters:
  • agent_id (int32) – The agent id to run the helper for.

  • transform (Transform) – The transform to project.

  • local_forward_vector (Vector) – The local forward direction.

Returns:

The transform projected onto the ground plane.

Return type:

Transform