unreal.VREditorInteractor

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

Bases: ViewportInteractor

VREditor default interactor

C++ Source:

  • Module: VREditor

  • File: VREditorInteractor.h

Editor Properties: (see get_editor_property/set_editor_property)

  • hand_mesh_component (StaticMeshComponent): [Read-Write] Access to the current handmesh. Use ReplaceHandMeshComponent() to update the entire StaticMeshComponent.

  • is_undo_redo_swipe_enabled (bool): [Read-Write] Whether swiping left/right on touchpad/joystick triggers undo/redo

get_controller_hand_side() Name

Sets the EControllerHand for this motioncontroller

Return type:

Name

get_controller_side() ControllerHand

Get the side of the controller

Return type:

ControllerHand

get_controller_type() ControllerType

Returns what controller type this is for asymmetric control schemes

Return type:

ControllerType

get_hmd_device_type() Name
Returns:

Returns the type of HMD we’re dealing with

Return type:

Name

get_laser_end() Vector

Get Laser End

Return type:

Vector

get_laser_start() Vector

Getters and setters

Return type:

Vector

get_last_trackpad_position() Vector2D

Get the last position of the trackpad or analog stick

Return type:

Vector2D

get_motion_controller_component() MotionControllerComponent

Get the motioncontroller component of this interactor

Return type:

MotionControllerComponent

get_select_and_move_trigger_value() float

Gets the trigger value

Return type:

float

get_slide_delta() float

Returns the slide delta for pushing and pulling objects. Needs to be implemented by derived classes (e.g. touchpad for vive controller or scrollweel for mouse )

Return type:

float

get_teleport_actor() VREditorTeleporter

Get Teleport Actor

Return type:

VREditorTeleporter

get_trackpad_position() Vector2D

Get the current position of the trackpad or analog stick

Return type:

Vector2D

property hand_mesh_component: StaticMeshComponent

[Read-Write] Access to the current handmesh. Use ReplaceHandMeshComponent() to update the entire StaticMeshComponent.

Type:

(StaticMeshComponent)

init(vr_mode) None

Initialize default values

Parameters:

vr_mode (VREditorMode) –

is_clicking_on_ui() bool

Gets if the interactor is clicking on any UI

Return type:

bool

is_hovering_over_ui() bool

Gets if this interactor is hovering over UI

Return type:

bool

is_touching_trackpad() bool

Check if the touchpad is currently touched

Return type:

bool

replace_hand_mesh_component(new_mesh, mesh_scale=[1.000000, 1.000000, 1.000000]) None

Replace the default VR controller mesh with a custom one.

Parameters:
set_controller_hand_side(controller_hand_side) None

Sets the EControllerHand for this motioncontroller

Parameters:

controller_hand_side (Name) –

set_controller_type(controller_type) None

Set what controller type this is for asymmetric control schemes

Parameters:

controller_type (ControllerType) –

set_force_laser_color(color) None

Next frame this will be used as color for the laser

Parameters:

color (LinearColor) –

set_force_show_laser(force_show) None

Set if we want to force to show the laser

Parameters:

force_show (bool) –

setup_component(owning_actor) None

Sets up all components

Parameters:

owning_actor (Actor) –

try_override_controller_type(controller_type) bool

Temporary set what controller type this is for asymmetric control schemes. You can’t override the controller type when there’s already an override. Remove the temporary controller type with EControllerType::Unknown

Parameters:

controller_type (ControllerType) –

Returns:

true if the controller type was changed

Return type:

bool

update_hand_mesh_relative_transform() None

Update Hand Mesh Relative Transform