unreal.SteamVRInputDeviceFunctionLibrary

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

Bases: unreal.BlueprintFunctionLibrary

  • SteamVR Input Extended Functions

  • Functions and properties defined here are safe for developer use

C++ Source:

  • Plugin: SteamVR

  • Module: SteamVRInputDevice

  • File: SteamVRInputDeviceFunctionLibrary.h

classmethod find_steam_vr_action(action_name, action_set="main") -> (result=bool, found_action=SteamVRAction, found_action_set=SteamVRActionSet)

Search for a valid action matching the given action name and action set

Parameters
  • action_name (Name) – The name of the action to look for (e.g. TeleportLeft)

  • action_set (Name) – The name of the action set that the action belongs to (e.g. main). Default is “main”

Returns

result (bool):

found_action (SteamVRAction):

found_action_set (SteamVRActionSet):

Return type

tuple

classmethod find_steam_vr_action_origin(action_name, action_set='main')bool

Search and show the current binding of a provided action name and action set in the user’s HMD

Parameters
  • action_name (Name) –

  • action_set (Name) –

Returns

Return type

bool

classmethod find_steam_vr_input_binding_info(action_name, action_set='main')

Retrieves useful information about the SteamVR input bindings with a given action name and action set.

Parameters
  • action_name (Name) – The name of the action that binding info will be retrieved for the currently active controller

  • action_set (Name) – The name of the action set that the action belongs in

Returns

SteamVRInputBindingInfo - Array of binding info for an action with the currently active controller

Return type

Array(SteamVRInputBindingInfo)

classmethod find_steam_vr_origin_tracked_device_info(action_name, action_set="main") -> (result=bool, input_origin_info=SteamVRInputOriginInfo)

Find and return information about the tracked device associated from the input source.

Parameters
  • action_name (Name) –

  • action_set (Name) –

Returns

result (bool):

input_origin_info (SteamVRInputOriginInfo):

Return type

tuple

classmethod get_controller_fidelity() -> (left_controller_fidelity=ControllerFidelity, right_controller_fidelity=ControllerFidelity)

Retrieve skeletal tracking level for all controllers

Returns

left_controller_fidelity (ControllerFidelity):

right_controller_fidelity (ControllerFidelity):

Return type

tuple

classmethod get_curls_and_splays_state() -> (left_hand_state=bool, right_hand_state=bool)

Check Whether or not Curls and Splay values are being retrieved per frame from the SteamVR Input System

Returns

left_hand_state (bool):

right_hand_state (bool):

Return type

tuple

classmethod get_finger_curls_and_splays(hand, summary_data_type=SkeletalSummaryDataType.VR_SUMMARY_TYPE_FROM_ANIMATION) -> (finger_curls=SteamVRFingerCurls, finger_splays=SteamVRFingerSplays)

Get the finger curl and splay for a give hand in the current frame

Parameters
Returns

finger_curls (SteamVRFingerCurls): Curl values for each finger pair this frame

finger_splays (SteamVRFingerSplays):

Return type

tuple

classmethod get_left_hand_pose_data() -> (position=Vector, orientation=Rotator, angular_velocity=Vector, velocity=Vector)

Retrieve the left hand pose information - position, orientation and velocities

Returns

position (Vector):

orientation (Rotator):

angular_velocity (Vector):

velocity (Vector):

Return type

tuple

classmethod get_pose_source()bool

Check whether we are using a skeleton pose or the raw controller pose for the orientation and position of the motion controller

Returns

using_skeleton_pose (bool):

Return type

bool

classmethod get_right_hand_pose_data() -> (position=Vector, orientation=Rotator, angular_velocity=Vector, velocity=Vector)

Retrieve the right hand pose information - position, orientation and velocities

Returns

position (Vector):

orientation (Rotator):

angular_velocity (Vector):

velocity (Vector):

Return type

tuple

classmethod get_skeletal_state() -> (left_hand_state=bool, right_hand_state=bool)

Check Whether or not controllers attached to either hand have Skeletal Input support

Returns

left_hand_state (bool):

right_hand_state (bool):

Return type

tuple

classmethod get_skeletal_transform(with_controller=False) -> (left_hand=SteamVRSkeletonTransform, right_hand=SteamVRSkeletonTransform)

Retrieve the live skeletal input bone values from SteamVR

Parameters

with_controller (bool) – Whether or not retrieve skeletal input values with controller

Returns

left_hand (SteamVRSkeletonTransform):

right_hand (SteamVRSkeletonTransform):

Return type

tuple

classmethod get_steam_vr_action_array()

Retrieve the input actions for this project

Returns

steam_vr_actions (Array(SteamVRAction)):

Return type

Array(SteamVRAction)

classmethod get_steam_vr_action_set_array()

Retrieve the input action sets for this project

Returns

steam_vr_action_sets (Array(SteamVRActionSet)):

Return type

Array(SteamVRActionSet)

classmethod get_steam_vr_global_predicted_seconds_from_now()float

Returns the the current value of the global PredictedSecondsFromNow use in any Get Pose Action Data calls (i.e. Getting controller transform) A value of -9999.f triggers a GetPoseActionDataForNextFrame, otherwise GetPoseActionRelativeToNow is called with this value

Returns

float - The current Predicted Seconds From Now from the SteamVRInput device

Return type

float

classmethod get_steam_vr_hand_pose_relative_to_now(hand=SteamVRHand.VR_LEFT, predicted_seconds_from_now=0.0)(position=Vector, orientation=Rotator) or None

Returns the data for the hand transform at any point in time from current time, given a relative number of seconds

Parameters
  • hand (SteamVRHand) – The hand that we’re going to retrieve the transform for

  • predicted_seconds_from_now (float) –

Returns

bool - Whether or not the call was succesful

position (Vector):

orientation (Rotator):

Return type

tuple or None

classmethod get_steam_vr_input_binding_info(steam_vr_action_handle)

Retrieves useful information about the SteamVR input bindings for an action.

Parameters

steam_vr_action_handle (SteamVRAction) – The action handle of the action that binding info will be retrieved for the currently active controller. Use Find SteamVRAction node to get a handle

Returns

SteamVRInputBindingInfo - Array of binding info for an action with the currently active controller

Return type

Array(SteamVRInputBindingInfo)

classmethod get_steam_vr_origin_localized_name(steam_vr_action, localized_parts)str

Retrieve the localized name of the origin of a given action (e.g. “Left Hand Index Controller Trackpad”)

Parameters
Returns

origin_localized_name (str):

Return type

str

classmethod get_steam_vr_origin_tracked_device_info(steam_vr_action)SteamVRInputOriginInfo or None

Returns information about the tracked device associated from the input source.

Parameters

steam_vr_action (SteamVRAction) – The action that’s the source of the input

Returns

bool - whether the operation is successful or not

input_origin_info (SteamVRInputOriginInfo):

Return type

SteamVRInputOriginInfo or None

classmethod get_user_ipd()float

Returns the user’s HMD’s current IPD (interpupillary distance) setting in millimetres.

Returns

float - The current IPD setting of the user’s headset in millimetres

Return type

float

classmethod play_steam_vr_haptic_feedback(hand, start_seconds_from_now, duration_seconds=1.0, frequency=1.0, amplitude=0.5)None

Generate haptic feedback in the requested controller

Parameters
  • hand (SteamVRHand) – Which hand to send the controller feedback to

  • start_seconds_from_now (float) – When to start the haptic feedback

  • duration_seconds (float) – How long to have the haptic feedback active

  • frequency (float) – Frequency used in the haptic feedback

  • amplitude (float) – Amplitude used in the haptic feedback

classmethod reset_seated_position()bool

Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After this call, calls that pass TrackingUniverseSeated as the origin will be relative to this new zero pose.

NOTE: This function overrides the user’s previously saved seated zero pose and should only be called as the result of a user action. Users are also able to set their seated zero pose via the SteamVR Dashboard.

Returns

Return type

bool

classmethod set_curls_and_splays_state(new_left_hand_state, new_right_hand_state)None

Tell SteamVR Whether or not to retrieve Curls and Splay values per frame

Parameters
  • new_left_hand_state (bool) – Whether or not curls and splay values will be retrieved for the left hand

  • new_right_hand_state (bool) – Whether or not curls and splay values will be retrieved for the right hand

classmethod set_pose_source(use_skeleton_pose)None

Set whether to use skeleton pose or the raw controller pose for the orientation and position of the motion controller

Parameters

use_skeleton_pose (bool) – Whether or not to use the skeleton pose instead of the controller raw pose

classmethod set_steam_vr_global_predicted_seconds_from_now(new_value)float

Sets the the current value of the global PredictedSecondsFromNow to use in any Get Pose Action Data calls (i.e. Getting controller transform) A value of -9999.f will trigger a GetPoseActionDataForNextFrame, otherwise GetPoseActionRelativeToNow will be called with this value

Parameters

new_value (float) – The value for PredictedSecondsFromNow that will be used by the SteamVRInput device for Get Action Pose Data calls

Returns

float - The current Predicted Seconds From Now from the SteamVRInput device

Return type

float

classmethod show_all_steam_vr_action_origins()None

Shows all current bindings for the current controller in the user’s headset

classmethod show_steam_vr_action_origin(steam_vr_action, steam_vr_action_set)None

Show the current binding of a given action in the user’s HMD

Parameters
  • steam_vr_action (SteamVRAction) – The action that we will lookup the current binding for

  • steam_vr_action_set (SteamVRActionSet) – The action set that the action belongs to