unreal.ViewportInteractor
¶
- class unreal.ViewportInteractor(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
Object
Represents the interactor in the world
C++ Source:
Module: ViewportInteraction
File: ViewportInteractor.h
- get_dragging_mode() ViewportInteractionDraggingMode ¶
Gets the current interactor data dragging mode
- Return type:
- get_hit_result_gizmo_filter_mode() HitResultGizmoFilterMode ¶
Gets current gizmo filter mode used for Interaction
- Return type:
- get_laser_pointer(even_if_blocked=False, laser_length_override=0.000000) (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:
- 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
- Return type:
- get_other_interactor() ViewportInteractor ¶
Gets the paired interactor assigned by the world interaction, can return null when there is no other interactor
- Return type:
- get_room_space_transform() Transform ¶
Gets the hand transform of the interactor, in the local tracking space
- Return type:
- 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
- Return type:
- handle_input_axis_bp(action, key, delta, delta_time) bool ¶
To be overridden. Called by HandleInputAxis before delegates and default input implementation
- Parameters:
action (ViewportActionKeyInput) –
key (Key) –
delta (float) –
delta_time (float) –
- Returns:
out_was_handled (bool):
- Return type:
- handle_input_key_bp(action, key, event) bool ¶
To be overridden. Called by HandleInputKey before delegates and default input implementation
- Parameters:
action (ViewportActionKeyInput) –
key (Key) –
event (InputEventType) –
- Returns:
out_was_handled (bool):
- Return type:
- is_hovering_over_gizmo() bool ¶
If the interactor laser is currently hovering over a gizmo handle
- Return type:
- 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) –