unreal.SteamVRFunctionLibrary

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

Bases: unreal.BlueprintFunctionLibrary

SteamVR Extensions Function Library

C++ Source:

  • Plugin: SteamVR

  • Module: SteamVR

  • File: SteamVRFunctionLibrary.h

classmethod get_hand_position_and_orientation(controller_index, hand) → (out_position=Vector, out_orientation=Rotator) or None

Given a controller index and a hand, returns the position and orientation of the controller deprecated: Use motion controller components instead

Parameters
  • controller_index (int32) – Index of the controller to get the tracked device ID for

  • hand (ControllerHand) – Which hand’s controller to get the position and orientation for

Returns

True if the specified controller index has a valid tracked device ID

out_position (Vector): (out) Current position of the device

out_orientation (Rotator):

Return type

tuple or None

classmethod get_tracked_device_position_and_orientation(device_id) → (out_position=Vector, out_orientation=Rotator) or None

Gets the orientation and position (in device space) of the device with the specified ID

Parameters

device_id (int32) – Id of the device to get tracking info for

Returns

True if the specified device id had a valid tracking pose this frame, false otherwise

out_position (Vector): (out) Current position of the device

out_orientation (Rotator): (out) Current orientation of the device

Return type

tuple or None

classmethod get_valid_tracked_device_ids(device_type)

Returns an array of the currently tracked device IDs

Parameters

device_type (SteamVRTrackedDeviceType) – Which class of device (e.g. controller, tracking devices) to get Device Ids for

Returns

out_tracked_device_ids (Array(int32)): (out) Array containing the ID of each device that’s currently tracked

Return type

Array(int32)