unreal.ViewportWorldInteraction
¶
- class unreal.ViewportWorldInteraction(outer=None, name='None')¶
Bases:
unreal.EditorWorldExtension
Viewport World Interaction
C++ Source:
Module: ViewportInteraction
File: ViewportWorldInteraction.h
- add_actor_to_exclude_from_hit_tests(actor_to_exclude_from_hit_tests) → None¶
Adds an actor to the list of actors to never allow an interactor to hit in the scene. No selection. No hover. There’s no need to remove actors from this list. They’ll expire from it automatically when destroyed.
- Parameters
actor_to_exclude_from_hit_tests (Actor) – The actor that should be forever excluded from hit tests
- add_interactor(interactor) → None¶
Adds interactor to the worldinteraction
- Parameters
interactor (ViewportInteractor) –
- get_head_transform() → Transform¶
Gets the transform of the viewport / user’s HMD in world space
- Returns
- Return type
- get_interactors()¶
Gets all the interactors
- Returns
- Return type
- get_room_space_head_transform() → Transform¶
Gets the transform of the viewport / user’s HMD in room space
- Returns
- Return type
- get_room_transform() → Transform¶
- Gets the world space transform of the calibrated VR room origin. When using a seated VR device, this will feel like the
camera’s world transform (before any HMD positional or rotation adjustments are applied.)
- Returns
- Return type
- get_transform_gizmo_actor() → BaseTransformGizmo¶
Gets the transform gizmo actor, or returns null if we currently don’t have one
- Returns
- Return type
- get_world_scale_factor() → float¶
Gets the world scale factor, which can be multiplied by a scale vector to convert to room space
- Returns
- Return type
- remove_interactor(interactor) → None¶
Removes interactor from the worldinteraction and removes the interactor from its paired interactor if any
- Parameters
interactor (ViewportInteractor) –
- set_head_transform(new_head_transform) → None¶
- Sets a new transform for the room so that the HMD is aligned to the new transform.
The Head is kept level to the ground and only rotated on the yaw
- Parameters
new_head_transform (Transform) –