unreal.ViewportInteractor

class unreal.ViewportInteractor(outer=None, name='None')

Bases: unreal.Object

Represents the interactor in the world

C++ Source:

  • Module: ViewportInteraction

  • File: ViewportInteractor.h

can_carry()bool

Gets if the interactor can carry an object

Returns

Return type

bool

get_dragging_mode()ViewportInteractionDraggingMode

Gets the current interactor data dragging mode

Returns

Return type

ViewportInteractionDraggingMode

get_hit_result_gizmo_filter_mode()HitResultGizmoFilterMode

Gets current gizmo filter mode used for Interaction

Returns

Return type

HitResultGizmoFilterMode

get_hover_location()Vector

Gets the interactor laser hover location

Returns

Return type

Vector

get_laser_pointer(even_if_blocked=False, laser_length_override=0.0)(laser_pointer_start=Vector, laser_pointer_end=Vector) or None

Gets the start and end point of the laser pointer for the specified hand

Parameters
  • even_if_blocked (bool) – If true, returns a laser pointer even if the hand has UI in front of it (defaults to false)

  • laser_length_override (float) – If zero the default laser length (VREdMode::GetLaserLength) is used

Returns

True if we have motion controller data for this hand and could return a valid result

laser_pointer_start (Vector):

laser_pointer_end (Vector):

Return type

tuple or None

get_last_room_space_transform()Transform

Gets the last hand transform of the interactor, in the local tracking space

Returns

Return type

Transform

get_last_transform()Transform

Gets the last world transform of this interactor

Returns

Return type

Transform

get_other_interactor()ViewportInteractor

Gets the paired interactor assigned by the world interaction, can return null when there is no other interactor

Returns

Return type

ViewportInteractor

get_room_space_transform()Transform

Gets the hand transform of the interactor, in the local tracking space

Returns

Return type

Transform

get_transform()Transform

Gets the world transform of this interactor

Returns

Return type

Transform

get_transform_and_forward_vector()(out_hand_transform=Transform, out_forward_vector=Vector) or None

Creates a hand transform and forward vector for a laser pointer for a given hand

Returns

True if we have motion controller data for this hand and could return a valid result

out_hand_transform (Transform): The created hand transform

out_forward_vector (Vector): The forward vector of the hand

Return type

tuple or None

get_world_interaction()ViewportWorldInteraction

Gets the world interaction

Returns

Return type

ViewportWorldInteraction

handle_input_axis_bp(action, key, delta, delta_time)bool

To be overridden. Called by HandleInputAxis before delegates and default input implementation

Parameters
Returns

out_was_handled (bool):

Return type

bool

handle_input_key_bp(action, key, event)bool

To be overridden. Called by HandleInputKey before delegates and default input implementation

Parameters
Returns

out_was_handled (bool):

Return type

bool

is_hovering_over_gizmo()bool

If the interactor laser is currently hovering over a gizmo handle

Returns

Return type

bool

set_can_carry(can_carry)None

Sets if the interactor can carry an object

Parameters

can_carry (bool) –

set_dragging_mode(new_dragging_mode)None

Sets the current dragging mode for this interactor

Parameters

new_dragging_mode (ViewportInteractionDraggingMode) –

set_hit_result_gizmo_filter_mode(new_filter)None

Sets the current gizmo filter mode used for Interaction

Parameters

new_filter (HitResultGizmoFilterMode) –

shutdown()None

Whenever the ViewportWorldInteraction is shut down, the interacts will shut down as well

tick(delta_time)None

Update for this interactor called by the ViewportWorldInteraction

Parameters

delta_time (float) –