• Articles
  • Tutorials
  • Api Documentation
  • Api Documentation

    Show / Hide Table of Contents

    Class SteamVR_Action_Pose_Source

    Inheritance
    System.Object
    SteamVR_Action_Source
    SteamVR_Action_In_Source
    SteamVR_Action_Pose_Source
    SteamVR_Action_Skeleton_Source
    Implements
    ISteamVR_Action_Pose
    ISteamVR_Action_In_Source
    ISteamVR_Action_Source
    Inherited Members
    SteamVR_Action_In_Source.inputOriginInfo_size
    SteamVR_Action_In_Source.isUpdating
    SteamVR_Action_In_Source.updateTime
    SteamVR_Action_In_Source.activeDevice
    SteamVR_Action_In_Source.trackedDeviceIndex
    SteamVR_Action_In_Source.renderModelComponentName
    SteamVR_Action_In_Source.localizedOriginName
    SteamVR_Action_In_Source.changedTime
    SteamVR_Action_In_Source.lastOriginGetFrame
    SteamVR_Action_In_Source.inputOriginInfo
    SteamVR_Action_In_Source.lastInputOriginInfo
    SteamVR_Action_In_Source.UpdateOriginTrackedDeviceInfo()
    SteamVR_Action_In_Source.GetLocalizedOriginPart(EVRInputStringBits[])
    SteamVR_Action_In_Source.GetLocalizedOrigin()
    SteamVR_Action_Source.fullPath
    SteamVR_Action_Source.handle
    SteamVR_Action_Source.actionSet
    SteamVR_Action_Source.direction
    SteamVR_Action_Source.inputSource
    SteamVR_Action_Source.setActive
    SteamVR_Action_Source.inputSourceHandle
    SteamVR_Action_Source.action
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ToString()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Valve.VR
    Assembly: Assembly-CSharp.dll
    Syntax
    public class SteamVR_Action_Pose_Source : SteamVR_Action_In_Source, ISteamVR_Action_Pose, ISteamVR_Action_In_Source, ISteamVR_Action_Source

    Fields

    changeTolerance

    The distance the pose needs to move/rotate before a change is detected

    Declaration
    public float changeTolerance
    Field Value
    Type Description
    System.Single

    lastPoseActionData

    Declaration
    protected InputPoseActionData_t lastPoseActionData
    Field Value
    Type Description
    InputPoseActionData_t

    poseAction

    Declaration
    protected SteamVR_Action_Pose poseAction
    Field Value
    Type Description
    SteamVR_Action_Pose

    poseActionData

    Declaration
    protected InputPoseActionData_t poseActionData
    Field Value
    Type Description
    InputPoseActionData_t

    poseActionData_size

    Declaration
    protected static uint poseActionData_size
    Field Value
    Type Description
    System.UInt32

    predictedSecondsFromNow

    The amount of time in the future (or past!) the input system will predict poses for. Default is one frame forward (at 90hz) to account for render time.

    Declaration
    public float predictedSecondsFromNow
    Field Value
    Type Description
    System.Single

    tempPoseActionData

    Declaration
    protected InputPoseActionData_t tempPoseActionData
    Field Value
    Type Description
    InputPoseActionData_t

    universeOrigin

    Declaration
    public ETrackingUniverseOrigin universeOrigin
    Field Value
    Type Description
    ETrackingUniverseOrigin

    Properties

    active

    True if this action is bound and the ActionSet is active

    Declaration
    public override bool active { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    SteamVR_Action_Source.active

    activeBinding

    True if the action is bound

    Declaration
    public override bool activeBinding { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    SteamVR_Action_Source.activeBinding

    activeOrigin

    The handle to the origin of the component that was used to update this pose

    Declaration
    public override ulong activeOrigin { get; }
    Property Value
    Type Description
    System.UInt64
    Overrides
    SteamVR_Action_In_Source.activeOrigin

    angularVelocity

    The local angular velocity of this pose relative to the universe origin

    Declaration
    public Vector3 angularVelocity { get; protected set; }
    Property Value
    Type Description
    UnityEngine.Vector3

    changed

    True when the orientation of the pose has changhed more than changeTolerance in the last update. Note: Will only return true if the action is also active.

    Declaration
    public override bool changed { get; protected set; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    SteamVR_Action_In_Source.changed

    deviceIsConnected

    True if the device bound to this action and input source is connected

    Declaration
    public bool deviceIsConnected { get; }
    Property Value
    Type Description
    System.Boolean

    lastActive

    If the action was active (ActionSet active and binding active) during the last update

    Declaration
    public override bool lastActive { get; protected set; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    SteamVR_Action_Source.lastActive

    lastActiveBinding

    If the action's binding was active during the previous update

    Declaration
    public override bool lastActiveBinding { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    SteamVR_Action_Source.lastActiveBinding

    lastActiveOrigin

    The handle to the origin of the component that was used to update the value for this action (for the previous update)

    Declaration
    public override ulong lastActiveOrigin { get; }
    Property Value
    Type Description
    System.UInt64
    Overrides
    SteamVR_Action_In_Source.lastActiveOrigin

    lastAngularVelocity

    The angular velocity for this pose during the previous update

    Declaration
    public Vector3 lastAngularVelocity { get; protected set; }
    Property Value
    Type Description
    UnityEngine.Vector3

    lastChanged

    The value of the action's 'changed' during the previous update

    Declaration
    public override bool lastChanged { get; protected set; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    SteamVR_Action_In_Source.lastChanged

    lastDeviceIsConnected

    True if the device bound to this action was connected during the previous update

    Declaration
    public bool lastDeviceIsConnected { get; }
    Property Value
    Type Description
    System.Boolean

    lastLocalPosition

    The local position for this pose during the previous update

    Declaration
    public Vector3 lastLocalPosition { get; protected set; }
    Property Value
    Type Description
    UnityEngine.Vector3

    lastLocalRotation

    The local rotation for this pose during the previous update

    Declaration
    public Quaternion lastLocalRotation { get; protected set; }
    Property Value
    Type Description
    UnityEngine.Quaternion

    lastPoseIsValid

    True if the pose was valid during the previous update

    Declaration
    public bool lastPoseIsValid { get; }
    Property Value
    Type Description
    System.Boolean

    lastTrackingState

    The tracking state for this pose during the previous update

    Declaration
    public ETrackingResult lastTrackingState { get; }
    Property Value
    Type Description
    ETrackingResult

    lastVelocity

    The velocity for this pose during the previous update

    Declaration
    public Vector3 lastVelocity { get; protected set; }
    Property Value
    Type Description
    UnityEngine.Vector3

    localPosition

    The local position of this action relative to the universe origin

    Declaration
    public Vector3 localPosition { get; protected set; }
    Property Value
    Type Description
    UnityEngine.Vector3

    localRotation

    The local rotation of this action relative to the universe origin

    Declaration
    public Quaternion localRotation { get; protected set; }
    Property Value
    Type Description
    UnityEngine.Quaternion

    poseIsValid

    True if the pose retrieved for this action and input source is valid (good data from the tracking source)

    Declaration
    public bool poseIsValid { get; }
    Property Value
    Type Description
    System.Boolean

    trackingState

    The state of the tracking system that is used to create pose data (position, rotation, etc)

    Declaration
    public ETrackingResult trackingState { get; }
    Property Value
    Type Description
    ETrackingResult

    velocity

    The local velocity of this pose relative to the universe origin

    Declaration
    public Vector3 velocity { get; protected set; }
    Property Value
    Type Description
    UnityEngine.Vector3

    Methods

    CheckAndSendEvents()

    Declaration
    protected virtual void CheckAndSendEvents()

    GetChanged()

    Declaration
    protected bool GetChanged()
    Returns
    Type Description
    System.Boolean

    GetPoseAtTimeOffset(Single, out Vector3, out Quaternion, out Vector3, out Vector3)

    SteamVR keeps a log of past poses so you can retrieve old poses or estimated poses in the future by passing in a secondsFromNow value that is negative or positive.

    Declaration
    public bool GetPoseAtTimeOffset(float secondsFromNow, out Vector3 positionAtTime, out Quaternion rotationAtTime, out Vector3 velocityAtTime, out Vector3 angularVelocityAtTime)
    Parameters
    Type Name Description
    System.Single secondsFromNow

    The time offset in the future (estimated) or in the past (previously recorded) you want to get data from

    UnityEngine.Vector3 positionAtTime
    UnityEngine.Quaternion rotationAtTime
    UnityEngine.Vector3 velocityAtTime
    UnityEngine.Vector3 angularVelocityAtTime
    Returns
    Type Description
    System.Boolean

    true if we successfully returned a pose

    GetUnityCoordinateAngularVelocity(Single, Single, Single)

    Declaration
    protected Vector3 GetUnityCoordinateAngularVelocity(float x, float y, float z)
    Parameters
    Type Name Description
    System.Single x
    System.Single y
    System.Single z
    Returns
    Type Description
    UnityEngine.Vector3

    GetUnityCoordinateAngularVelocity(HmdVector3_t)

    Declaration
    protected Vector3 GetUnityCoordinateAngularVelocity(HmdVector3_t vector)
    Parameters
    Type Name Description
    HmdVector3_t vector
    Returns
    Type Description
    UnityEngine.Vector3

    GetUnityCoordinateVelocity(Single, Single, Single)

    Declaration
    protected Vector3 GetUnityCoordinateVelocity(float x, float y, float z)
    Parameters
    Type Name Description
    System.Single x
    System.Single y
    System.Single z
    Returns
    Type Description
    UnityEngine.Vector3

    GetUnityCoordinateVelocity(HmdVector3_t)

    Declaration
    protected Vector3 GetUnityCoordinateVelocity(HmdVector3_t vector)
    Parameters
    Type Name Description
    HmdVector3_t vector
    Returns
    Type Description
    UnityEngine.Vector3

    GetVelocitiesAtTimeOffset(Single, out Vector3, out Vector3)

    SteamVR keeps a log of past poses so you can retrieve old poses or estimated poses in the future by passing in a secondsFromNow value that is negative or positive.

    Declaration
    public bool GetVelocitiesAtTimeOffset(float secondsFromNow, out Vector3 velocityAtTime, out Vector3 angularVelocityAtTime)
    Parameters
    Type Name Description
    System.Single secondsFromNow

    The time offset in the future (estimated) or in the past (previously recorded) you want to get data from

    UnityEngine.Vector3 velocityAtTime
    UnityEngine.Vector3 angularVelocityAtTime
    Returns
    Type Description
    System.Boolean

    true if we successfully returned a pose

    Initialize()

    [Should not be called by user code] Initializes the handle for the inputSource, the pose action data size, and any other related SteamVR data.

    Declaration
    public override void Initialize()
    Overrides
    SteamVR_Action_In_Source.Initialize()

    Preinitialize(SteamVR_Action, SteamVR_Input_Sources)

    [Should not be called by user code] Sets up the internals of the action source before SteamVR has been initialized.

    Declaration
    public override void Preinitialize(SteamVR_Action wrappingAction, SteamVR_Input_Sources forInputSource)
    Parameters
    Type Name Description
    SteamVR_Action wrappingAction
    SteamVR_Input_Sources forInputSource
    Overrides
    SteamVR_Action_Source.Preinitialize(SteamVR_Action, SteamVR_Input_Sources)

    SetCacheVariables()

    Declaration
    protected void SetCacheVariables()

    UpdateTransform(Transform)

    Update a transform's local position and local roation to match the pose.

    Declaration
    public void UpdateTransform(Transform transformToUpdate)
    Parameters
    Type Name Description
    UnityEngine.Transform transformToUpdate

    The transform of the object to be updated

    UpdateValue()

    [Should not be called by user code] Updates the data for this action and this input source. Sends related events.

    Declaration
    public override void UpdateValue()
    Overrides
    SteamVR_Action_In_Source.UpdateValue()

    UpdateValue(Boolean)

    [Should not be called by user code] Updates the data for this action and this input source. Sends related events.

    Declaration
    public virtual void UpdateValue(bool skipStateAndEventUpdates)
    Parameters
    Type Name Description
    System.Boolean skipStateAndEventUpdates

    Events

    onActiveBindingChange

    Event fires when the active state of the binding changes

    Declaration
    public event SteamVR_Action_Pose.ActiveChangeHandler onActiveBindingChange
    Event Type
    Type Description
    SteamVR_Action_Pose.ActiveChangeHandler

    onActiveChange

    Event fires when the active state (ActionSet active and binding active) changes

    Declaration
    public event SteamVR_Action_Pose.ActiveChangeHandler onActiveChange
    Event Type
    Type Description
    SteamVR_Action_Pose.ActiveChangeHandler

    onChange

    Event fires when the orientation of the pose changes more than the changeTolerance

    Declaration
    public event SteamVR_Action_Pose.ChangeHandler onChange
    Event Type
    Type Description
    SteamVR_Action_Pose.ChangeHandler

    onDeviceConnectedChanged

    Event fires when the device bound to this action is connected or disconnected

    Declaration
    public event SteamVR_Action_Pose.DeviceConnectedChangeHandler onDeviceConnectedChanged
    Event Type
    Type Description
    SteamVR_Action_Pose.DeviceConnectedChangeHandler

    onTrackingChanged

    Event fires when the state of the tracking system that is used to create pose data (position, rotation, etc) changes

    Declaration
    public event SteamVR_Action_Pose.TrackingChangeHandler onTrackingChanged
    Event Type
    Type Description
    SteamVR_Action_Pose.TrackingChangeHandler

    onUpdate

    Event fires when the action is updated

    Declaration
    public event SteamVR_Action_Pose.UpdateHandler onUpdate
    Event Type
    Type Description
    SteamVR_Action_Pose.UpdateHandler

    onValidPoseChanged

    Event fires when the state of the pose data retrieved for this action changes validity (good/bad data from the tracking source)

    Declaration
    public event SteamVR_Action_Pose.ValidPoseChangeHandler onValidPoseChanged
    Event Type
    Type Description
    SteamVR_Action_Pose.ValidPoseChangeHandler

    Implements

    ISteamVR_Action_Pose
    ISteamVR_Action_In_Source
    ISteamVR_Action_Source
    In This Article
    • Fields
      • changeTolerance
      • lastPoseActionData
      • poseAction
      • poseActionData
      • poseActionData_size
      • predictedSecondsFromNow
      • tempPoseActionData
      • universeOrigin
    • Properties
      • active
      • activeBinding
      • activeOrigin
      • angularVelocity
      • changed
      • deviceIsConnected
      • lastActive
      • lastActiveBinding
      • lastActiveOrigin
      • lastAngularVelocity
      • lastChanged
      • lastDeviceIsConnected
      • lastLocalPosition
      • lastLocalRotation
      • lastPoseIsValid
      • lastTrackingState
      • lastVelocity
      • localPosition
      • localRotation
      • poseIsValid
      • trackingState
      • velocity
    • Methods
      • CheckAndSendEvents()
      • GetChanged()
      • GetPoseAtTimeOffset(Single, out Vector3, out Quaternion, out Vector3, out Vector3)
      • GetUnityCoordinateAngularVelocity(Single, Single, Single)
      • GetUnityCoordinateAngularVelocity(HmdVector3_t)
      • GetUnityCoordinateVelocity(Single, Single, Single)
      • GetUnityCoordinateVelocity(HmdVector3_t)
      • GetVelocitiesAtTimeOffset(Single, out Vector3, out Vector3)
      • Initialize()
      • Preinitialize(SteamVR_Action, SteamVR_Input_Sources)
      • SetCacheVariables()
      • UpdateTransform(Transform)
      • UpdateValue()
      • UpdateValue(Boolean)
    • Events
      • onActiveBindingChange
      • onActiveChange
      • onChange
      • onDeviceConnectedChanged
      • onTrackingChanged
      • onUpdate
      • onValidPoseChanged
    • Implements
    Back to top Copyright (c) Valve Corporation, All rights reserved.