unreal.MassLookAtSubsystem

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

Bases: MassTickableSubsystemBase

Subsystem that keeps track of the LookAt targets

C++ Source:

  • Plugin: MassAI

  • Module: MassAIBehavior

  • File: MassLookAtSubsystem.h

create_look_at_actor_request(viewer_actor, priority, target_actor, interpolation_speed=MassLookAtInterpolationSpeed.REGULAR, custom_interpolation_speed=1.500000) MassLookAtRequestHandle

Creates a new LookAt request using the provided parameters for the mass entity associated to ‘ViewerActor’, if any.

Parameters:
  • viewer_actor (Actor) – Actor associated to the mass entity that needs to perform the LookAt

  • priority (MassLookAtPriority) – Priority assigned to the request that will influence selected request when multiple requests are sent to the same entity

  • target_actor (Actor) – Actor used as reference for the target location. If the actor has an associated mass entity then the target location will be updated during the request lifetime. Otherwise, the actor location will be used to create a LookAt using a static target location

  • interpolation_speed (MassLookAtInterpolationSpeed) – Optional parameter to use predefined interpolation speed

  • custom_interpolation_speed (float) – Optional parameter to specify a custom interpolation speed when ‘InterpolationSpeed’ is set to EMassLookAtInterpolationSpeed::Custom Method will log an error if it fails (e.g., no associated mass entity for viewer)

Return type:

MassLookAtRequestHandle

create_look_at_position_request(viewer_actor, priority, target_location, interpolation_speed=MassLookAtInterpolationSpeed.REGULAR, custom_interpolation_speed=1.500000) MassLookAtRequestHandle

Creates a new LookAt request using the provided parameters for the mass entity associated to ‘ViewerActor’, if any.

Parameters:
  • viewer_actor (Actor) – Actor associated to the mass entity that needs to perform the LookAt

  • priority (MassLookAtPriority) – Priority assigned to the request that will influence selected request when multiple requests are sent to the same entity

  • target_location (Vector) – Static location used as target

  • interpolation_speed (MassLookAtInterpolationSpeed) – Optional parameter to use predefined interpolation speed

  • custom_interpolation_speed (float) – Optional parameter to specify a custom interpolation speed when ‘InterpolationSpeed’ is set to EMassLookAtInterpolationSpeed::Custom Method will log an error if it fails (e.g., no associated mass entity).

Return type:

MassLookAtRequestHandle

create_request(viewer_actor: Actor, priority: MassLookAtPriority, target_location: Vector, interpolation_speed: MassLookAtInterpolationSpeed = Ellipsis, custom_interpolation_speed: float = 1.5) MassLookAtRequestHandle

deprecated: ‘create_request’ was renamed to ‘create_look_at_position_request’.

delete_request(request_handle) None

Removes given request from the active LookAt requests. Method will log an error if it fails (e.g., invalid request handle).

Parameters:

request_handle (MassLookAtRequestHandle)