Class SteamVR_Action_Skeleton
Inheritance
Inherited Members
Namespace: Valve.VR
Assembly: Assembly-CSharp.dll
Syntax
[Serializable]
public class SteamVR_Action_Skeleton : SteamVR_Action_Pose_Base<SteamVR_Action_Skeleton_Source_Map, SteamVR_Action_Skeleton_Source>, IEquatable<SteamVR_Action>, ISteamVR_Action_In, ISteamVR_Action, ISteamVR_Action_Pose, ISteamVR_Action_In_Source, ISteamVR_Action_Source, ISteamVR_Action_Skeleton_Source, ISerializationCallbackReceiver
Constructors
SteamVR_Action_Skeleton()
Declaration
public SteamVR_Action_Skeleton()
Fields
numBones
Declaration
public const int numBones = 31
Field Value
Type | Description |
---|---|
System.Int32 |
steamVRFixUpRotation
Declaration
public static Quaternion steamVRFixUpRotation
Field Value
Type | Description |
---|---|
UnityEngine.Quaternion |
Properties
boneCount
The number of bones in the skeleton for this action
Declaration
public int boneCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
bonePositions
An array of the positions of the bones from the most recent update. Relative to skeletalTransformSpace. See SteamVR_Skeleton_JointIndexes for bone indexes.
Declaration
public Vector3[] bonePositions { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Vector3[] |
boneRotations
An array of the rotations of the bones from the most recent update. Relative to skeletalTransformSpace. See SteamVR_Skeleton_JointIndexes for bone indexes.
Declaration
public Quaternion[] boneRotations { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Quaternion[] |
fingerCurls
0-1 values representing how curled the specified finger is. 0 being straight, 1 being fully curled. For indexes see: SteamVR_Skeleton_FingerIndexes
Declaration
public float[] fingerCurls { get; }
Property Value
Type | Description |
---|---|
System.Single[] |
fingerSplays
0-1 values representing how splayed the specified finger and it's next index'd finger is. For indexes see: SteamVR_Skeleton_FingerIndexes
Declaration
public float[] fingerSplays { get; }
Property Value
Type | Description |
---|---|
System.Single[] |
indexCurl
A 0-1 value representing how curled the index finger is. 0 being straight, 1 being fully curled.
Declaration
public float indexCurl { get; }
Property Value
Type | Description |
---|---|
System.Single |
indexMiddleSplay
A 0-1 value representing the size of the gap between the index and middle fingers
Declaration
public float indexMiddleSplay { get; }
Property Value
Type | Description |
---|---|
System.Single |
lastBonePositions
From the previous update: An array of the positions of the bones from the most recent update. Relative to skeletalTransformSpace. See SteamVR_Skeleton_JointIndexes for bone indexes.
Declaration
public Vector3[] lastBonePositions { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Vector3[] |
lastBoneRotations
From the previous update: An array of the rotations of the bones from the most recent update. Relative to skeletalTransformSpace. See SteamVR_Skeleton_JointIndexes for bone indexes.
Declaration
public Quaternion[] lastBoneRotations { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Quaternion[] |
lastFingerCurls
[Previous Update] 0-1 values representing how curled the specified finger is. 0 being straight, 1 being fully curled. For indexes see: SteamVR_Skeleton_FingerIndexes
Declaration
public float[] lastFingerCurls { get; }
Property Value
Type | Description |
---|---|
System.Single[] |
lastFingerSplays
[Previous Update] 0-1 values representing how splayed the specified finger and it's next index'd finger is. For indexes see: SteamVR_Skeleton_FingerIndexes
Declaration
public float[] lastFingerSplays { get; }
Property Value
Type | Description |
---|---|
System.Single[] |
lastIndexCurl
[Previous Update] A 0-1 value representing how curled the index finger is. 0 being straight, 1 being fully curled.
Declaration
public float lastIndexCurl { get; }
Property Value
Type | Description |
---|---|
System.Single |
lastIndexMiddleSplay
[Previous Update] A 0-1 value representing the size of the gap between the index and middle fingers
Declaration
public float lastIndexMiddleSplay { get; }
Property Value
Type | Description |
---|---|
System.Single |
lastMiddleCurl
[Previous Update] A 0-1 value representing how curled the middle finger is. 0 being straight, 1 being fully curled.
Declaration
public float lastMiddleCurl { get; }
Property Value
Type | Description |
---|---|
System.Single |
lastMiddleRingSplay
[Previous Update] A 0-1 value representing the size of the gap between the middle and ring fingers
Declaration
public float lastMiddleRingSplay { get; }
Property Value
Type | Description |
---|---|
System.Single |
lastPinkyCurl
[Previous Update] A 0-1 value representing how curled the pinky finger is. 0 being straight, 1 being fully curled.
Declaration
public float lastPinkyCurl { get; }
Property Value
Type | Description |
---|---|
System.Single |
lastRingCurl
[Previous Update] A 0-1 value representing how curled the ring finger is. 0 being straight, 1 being fully curled.
Declaration
public float lastRingCurl { get; }
Property Value
Type | Description |
---|---|
System.Single |
lastRingPinkySplay
[Previous Update] A 0-1 value representing the size of the gap between the ring and pinky fingers
Declaration
public float lastRingPinkySplay { get; }
Property Value
Type | Description |
---|---|
System.Single |
lastThumbCurl
[Previous Update] A 0-1 value representing how curled the thumb is. 0 being straight, 1 being fully curled.
Declaration
public float lastThumbCurl { get; }
Property Value
Type | Description |
---|---|
System.Single |
lastThumbIndexSplay
[Previous Update] A 0-1 value representing the size of the gap between the thumb and index fingers
Declaration
public float lastThumbIndexSplay { get; }
Property Value
Type | Description |
---|---|
System.Single |
middleCurl
A 0-1 value representing how curled the middle finger is. 0 being straight, 1 being fully curled.
Declaration
public float middleCurl { get; }
Property Value
Type | Description |
---|---|
System.Single |
middleRingSplay
A 0-1 value representing the size of the gap between the middle and ring fingers
Declaration
public float middleRingSplay { get; }
Property Value
Type | Description |
---|---|
System.Single |
pinkyCurl
A 0-1 value representing how curled the pinky finger is. 0 being straight, 1 being fully curled.
Declaration
public float pinkyCurl { get; }
Property Value
Type | Description |
---|---|
System.Single |
poseChanged
Separate from "changed". If the pose for this skeleton action has changed (root position/rotation)
Declaration
public bool poseChanged { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
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 { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
rangeOfMotion
The range of motion the we're using to get bone data from. With Controller being your hand while holding the controller.
Declaration
public EVRSkeletalMotionRange rangeOfMotion { get; set; }
Property Value
Type | Description |
---|---|
EVRSkeletalMotionRange |
ringCurl
A 0-1 value representing how curled the ring finger is. 0 being straight, 1 being fully curled.
Declaration
public float ringCurl { get; }
Property Value
Type | Description |
---|---|
System.Single |
ringPinkySplay
A 0-1 value representing the size of the gap between the ring and pinky fingers
Declaration
public float ringPinkySplay { get; }
Property Value
Type | Description |
---|---|
System.Single |
skeletalTrackingLevel
Get the accuracy level of the skeletal tracking data.
* Estimated: Body part location can’t be directly determined by the device. Any skeletal pose provided by the device is estimated based on the active buttons, triggers, joysticks, or other input sensors. Examples include the Vive Controller and gamepads.
* Partial: Body part location can be measured directly but with fewer degrees of freedom than the actual body part.Certain body part positions may be unmeasured by the device and estimated from other input data.Examples include Knuckles or gloves that only measure finger curl
* Full: Body part location can be measured directly throughout the entire range of motion of the body part.Examples include hi-end mocap systems, or gloves that measure the rotation of each finger segment.
Declaration
public EVRSkeletalTrackingLevel skeletalTrackingLevel { get; }
Property Value
Type | Description |
---|---|
EVRSkeletalTrackingLevel |
skeletalTransformSpace
The space to get bone data in. Parent space by default
Declaration
public EVRSkeletalTransformSpace skeletalTransformSpace { get; set; }
Property Value
Type | Description |
---|---|
EVRSkeletalTransformSpace |
thumbCurl
A 0-1 value representing how curled the thumb is. 0 being straight, 1 being fully curled.
Declaration
public float thumbCurl { get; }
Property Value
Type | Description |
---|---|
System.Single |
thumbIndexSplay
A 0-1 value representing the size of the gap between the thumb and index fingers
Declaration
public float thumbIndexSplay { get; }
Property Value
Type | Description |
---|---|
System.Single |
Methods
AddOnActiveChangeListener(SteamVR_Action_Skeleton.ActiveChangeHandler)
Executes a function when this action's bound state changes
Declaration
public void AddOnActiveChangeListener(SteamVR_Action_Skeleton.ActiveChangeHandler functionToCall)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Skeleton.ActiveChangeHandler | functionToCall |
AddOnChangeListener(SteamVR_Action_Skeleton.ChangeHandler)
Executes a function when the state of this action changes
Declaration
public void AddOnChangeListener(SteamVR_Action_Skeleton.ChangeHandler functionToCall)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Skeleton.ChangeHandler | functionToCall | A local function that receives the boolean action who's state has changed, the corresponding input source, and the new value |
AddOnDeviceConnectedChanged(SteamVR_Action_Skeleton.DeviceConnectedChangeHandler)
Fires an event when a device is connected or disconnected.
Declaration
public void AddOnDeviceConnectedChanged(SteamVR_Action_Skeleton.DeviceConnectedChangeHandler functionToCall)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Skeleton.DeviceConnectedChangeHandler | functionToCall | The method you would like to be called when a device is connected. Should take a SteamVR_Action_Pose as a param |
AddOnTrackingChanged(SteamVR_Action_Skeleton.TrackingChangeHandler)
Fires an event when the tracking of the device has changed
Declaration
public void AddOnTrackingChanged(SteamVR_Action_Skeleton.TrackingChangeHandler functionToCall)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Skeleton.TrackingChangeHandler | functionToCall | The method you would like to be called when tracking has changed. Should take a SteamVR_Action_Pose as a param |
AddOnUpdateListener(SteamVR_Action_Skeleton.UpdateHandler)
Executes a function when the state of this action is updated.
Declaration
public void AddOnUpdateListener(SteamVR_Action_Skeleton.UpdateHandler functionToCall)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Skeleton.UpdateHandler | functionToCall | A local function that receives the boolean action who's state has changed, the corresponding input source, and the new value |
AddOnValidPoseChanged(SteamVR_Action_Skeleton.ValidPoseChangeHandler)
Fires an event when the device now has a valid pose or no longer has a valid pose
Declaration
public void AddOnValidPoseChanged(SteamVR_Action_Skeleton.ValidPoseChangeHandler functionToCall)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Skeleton.ValidPoseChangeHandler | functionToCall | The method you would like to be called when the pose has become valid or invalid. Should take a SteamVR_Action_Pose as a param |
GetActive()
True if this action is bound and the ActionSet is active
Declaration
public bool GetActive()
Returns
Type | Description |
---|---|
System.Boolean |
GetAngularVelocity()
The local angular velocity of the pose relative to the universe origin
Declaration
public Vector3 GetAngularVelocity()
Returns
Type | Description |
---|---|
UnityEngine.Vector3 |
GetBoneCount()
Returns the total number of bones in the skeleton
Declaration
public uint GetBoneCount()
Returns
Type | Description |
---|---|
System.UInt32 |
GetBoneHierarchy()
Returns the order of bones in the hierarchy
Declaration
public int[] GetBoneHierarchy()
Returns
Type | Description |
---|---|
System.Int32[] |
GetBoneName(Int32)
Returns the name of the bone
Declaration
public string GetBoneName(int boneIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | boneIndex |
Returns
Type | Description |
---|---|
System.String |
GetBonePositions(Boolean)
Gets the bone positions in local space. This array may be modified later so if you want to hold this data then pass true to get a copy of the data instead of the actual array
Declaration
public Vector3[] GetBonePositions(bool copy = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | copy | This array may be modified later so if you want to hold this data then pass true to get a copy of the data instead of the actual array |
Returns
Type | Description |
---|---|
UnityEngine.Vector3[] |
GetBoneRotations(Boolean)
Gets the bone rotations in local space. This array may be modified later so if you want to hold this data then pass true to get a copy of the data instead of the actual array
Declaration
public Quaternion[] GetBoneRotations(bool copy = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | copy | This array may be modified later so if you want to hold this data then pass true to get a copy of the data instead of the actual array |
Returns
Type | Description |
---|---|
UnityEngine.Quaternion[] |
GetDeviceIsConnected()
True if the device bound to this action is connected
Declaration
public bool GetDeviceIsConnected()
Returns
Type | Description |
---|---|
System.Boolean |
GetFingerCurl(Int32)
Returns a value indicating how much the passed in finger is currently curled.
Declaration
public float GetFingerCurl(int finger)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | finger | The index of the finger to return a curl value for. 0-4. thumb, index, middle, ring, pinky |
Returns
Type | Description |
---|---|
System.Single | 0-1 value. 0 being straight, 1 being fully curled. |
GetFingerCurl(SteamVR_Skeleton_FingerIndexEnum)
Returns a value indicating how much the passed in finger is currently curled.
Declaration
public float GetFingerCurl(SteamVR_Skeleton_FingerIndexEnum finger)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Skeleton_FingerIndexEnum | finger | The finger to return a curl value for |
Returns
Type | Description |
---|---|
System.Single | 0-1 value. 0 being straight, 1 being fully curled. |
GetFingerCurls(Boolean)
Returns the finger curl data that we calculate each update. This array may be modified later so if you want to hold this data then pass true to get a copy of the data instead of the actual array
Declaration
public float[] GetFingerCurls(bool copy = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | copy | This array may be modified later so if you want to hold this data then pass true to get a copy of the data instead of the actual array |
Returns
Type | Description |
---|---|
System.Single[] |
GetFingerSplays(Boolean)
Returns the finger splay data that we calculate each update. This array may be modified later so if you want to hold this data then pass true to get a copy of the data instead of the actual array
Declaration
public float[] GetFingerSplays(bool copy = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | copy | This array may be modified later so if you want to hold this data then pass true to get a copy of the data instead of the actual array |
Returns
Type | Description |
---|---|
System.Single[] |
GetLastAngularVelocity()
The last local angular velocity of the pose relative to the universe origin
Declaration
public Vector3 GetLastAngularVelocity()
Returns
Type | Description |
---|---|
UnityEngine.Vector3 |
GetLastBonePositions(Boolean)
Gets the bone positions in local space from the previous update. This array may be modified later so if you want to hold this data then pass true to get a copy of the data instead of the actual array
Declaration
public Vector3[] GetLastBonePositions(bool copy = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | copy | This array may be modified later so if you want to hold this data then pass true to get a copy of the data instead of the actual array |
Returns
Type | Description |
---|---|
UnityEngine.Vector3[] |
GetLastBoneRotations(Boolean)
Gets the bone rotations in local space from the previous update. This array may be modified later so if you want to hold this data then pass true to get a copy of the data instead of the actual array
Declaration
public Quaternion[] GetLastBoneRotations(bool copy = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | copy | This array may be modified later so if you want to hold this data then pass true to get a copy of the data instead of the actual array |
Returns
Type | Description |
---|---|
UnityEngine.Quaternion[] |
GetLastDeviceIsConnected()
True if the device bound to this action was connected during the previous update
Declaration
public bool GetLastDeviceIsConnected()
Returns
Type | Description |
---|---|
System.Boolean |
GetLastFingerCurl(Int32)
Returns a value indicating how much the passed in finger was curled during the previous update
Declaration
public float GetLastFingerCurl(int finger)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | finger | The index of the finger to return a curl value for. 0-4. thumb, index, middle, ring, pinky |
Returns
Type | Description |
---|---|
System.Single | 0-1 value. 0 being straight, 1 being fully curled. |
GetLastFingerCurl(SteamVR_Skeleton_FingerIndexEnum)
Returns a value indicating how much the passed in finger was curled during the previous update
Declaration
public float GetLastFingerCurl(SteamVR_Skeleton_FingerIndexEnum finger)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Skeleton_FingerIndexEnum | finger | The finger to return a curl value for |
Returns
Type | Description |
---|---|
System.Single | 0-1 value. 0 being straight, 1 being fully curled. |
GetLastFingerCurls(Boolean)
Returns the finger curl data from the previous update. This array may be modified later so if you want to hold this data then pass true to get a copy of the data instead of the actual array
Declaration
public float[] GetLastFingerCurls(bool copy = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | copy | This array may be modified later so if you want to hold this data then pass true to get a copy of the data instead of the actual array |
Returns
Type | Description |
---|---|
System.Single[] |
GetLastFingerSplays(Boolean)
Returns the finger splay data from the previous update. This array may be modified later so if you want to hold this data then pass true to get a copy of the data instead of the actual array
Declaration
public float[] GetLastFingerSplays(bool copy = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | copy | This array may be modified later so if you want to hold this data then pass true to get a copy of the data instead of the actual array |
Returns
Type | Description |
---|---|
System.Single[] |
GetLastLocalPosition()
The last local position of the pose relative to the universe origin
Declaration
public Vector3 GetLastLocalPosition()
Returns
Type | Description |
---|---|
UnityEngine.Vector3 |
GetLastLocalRotation()
The last local rotation of the pose relative to the universe origin
Declaration
public Quaternion GetLastLocalRotation()
Returns
Type | Description |
---|---|
UnityEngine.Quaternion |
GetLastPoseIsValid()
True if the pose was valid during the previous update
Declaration
public bool GetLastPoseIsValid()
Returns
Type | Description |
---|---|
System.Boolean |
GetLastSplay(Int32)
Returns a value indicating the size of the gap between fingers during the previous update
Declaration
public float GetLastSplay(int fingerGapIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | fingerGapIndex | The index of the finger gap to return a splay value for. 0 being the gap between thumb and index, 1 being the gap between index and middle, 2 being the gap between middle and ring, and 3 being the gap between ring and pinky. |
Returns
Type | Description |
---|---|
System.Single | 0-1 value. 0 being no gap, 1 being "full" gap |
GetLastSplay(SteamVR_Skeleton_FingerSplayIndexEnum)
Returns a value indicating the size of the gap between fingers during the previous update
Declaration
public float GetLastSplay(SteamVR_Skeleton_FingerSplayIndexEnum fingerSplay)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Skeleton_FingerSplayIndexEnum | fingerSplay |
Returns
Type | Description |
---|---|
System.Single | 0-1 value. 0 being no gap, 1 being "full" gap |
GetLastTrackingResult()
The tracking state for this pose during the previous update
Declaration
public ETrackingResult GetLastTrackingResult()
Returns
Type | Description |
---|---|
ETrackingResult |
GetLastVelocity()
The last local velocity of the pose relative to the universe origin
Declaration
public Vector3 GetLastVelocity()
Returns
Type | Description |
---|---|
UnityEngine.Vector3 |
GetLocalizedName(EVRInputStringBits[])
Gets the localized name of the device that the action corresponds to. Include as many EVRInputStringBits as you want to add to the localized string
Declaration
public string GetLocalizedName(params EVRInputStringBits[] localizedParts)
Parameters
Type | Name | Description |
---|---|---|
EVRInputStringBits[] | localizedParts |
|
Returns
Type | Description |
---|---|
System.String |
GetLocalPosition()
The local position of the pose relative to the universe origin
Declaration
public Vector3 GetLocalPosition()
Returns
Type | Description |
---|---|
UnityEngine.Vector3 |
GetLocalRotation()
The local rotation of the pose relative to the universe origin
Declaration
public Quaternion GetLocalRotation()
Returns
Type | Description |
---|---|
UnityEngine.Quaternion |
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 position, out Quaternion rotation, out Vector3 velocity, out Vector3 angularVelocity)
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 | position | |
UnityEngine.Quaternion | rotation | |
UnityEngine.Vector3 | velocity | |
UnityEngine.Vector3 | angularVelocity |
Returns
Type | Description |
---|---|
System.Boolean | true if we successfully returned a pose |
GetPoseIsValid()
True if the pose retrieved for this action is valid (good data from the tracking source)
Declaration
public bool GetPoseIsValid()
Returns
Type | Description |
---|---|
System.Boolean |
GetReferenceTransforms(EVRSkeletalTransformSpace, EVRSkeletalReferencePose)
Returns an array of positions/rotations that represent the state of each bone in a reference pose.
Declaration
public SteamVR_Utils.RigidTransform[] GetReferenceTransforms(EVRSkeletalTransformSpace transformSpace, EVRSkeletalReferencePose referencePose)
Parameters
Type | Name | Description |
---|---|---|
EVRSkeletalTransformSpace | transformSpace | What to get the position/rotation data relative to, the model, or the bone's parent |
EVRSkeletalReferencePose | referencePose | Which reference pose to return |
Returns
Type | Description |
---|---|
SteamVR_Utils.RigidTransform[] |
GetSetActive()
True if the ActionSet that contains this action is active
Declaration
public bool GetSetActive()
Returns
Type | Description |
---|---|
System.Boolean |
GetSkeletalTrackingLevel()
Get the accuracy level of the skeletal tracking data.
Declaration
public EVRSkeletalTrackingLevel GetSkeletalTrackingLevel()
Returns
Type | Description |
---|---|
EVRSkeletalTrackingLevel |
|
GetSplay(Int32)
Returns a value indicating how the size of the gap between fingers.
Declaration
public float GetSplay(int fingerGapIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | fingerGapIndex | The index of the finger gap to return a splay value for. 0 being the gap between thumb and index, 1 being the gap between index and middle, 2 being the gap between middle and ring, and 3 being the gap between ring and pinky. |
Returns
Type | Description |
---|---|
System.Single | 0-1 value. 0 being no gap, 1 being "full" gap |
GetSplay(SteamVR_Skeleton_FingerSplayIndexEnum)
Returns a value indicating how the size of the gap between fingers.
Declaration
public float GetSplay(SteamVR_Skeleton_FingerSplayIndexEnum fingerSplay)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Skeleton_FingerSplayIndexEnum | fingerSplay |
Returns
Type | Description |
---|---|
System.Single | 0-1 value. 0 being no gap, 1 being "full" gap |
GetTrackingResult()
The state of the tracking system that is used to create pose data (position, rotation, etc)
Declaration
public ETrackingResult GetTrackingResult()
Returns
Type | Description |
---|---|
ETrackingResult |
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 velocity, out Vector3 angularVelocity)
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 | velocity | |
UnityEngine.Vector3 | angularVelocity |
Returns
Type | Description |
---|---|
System.Boolean | true if we successfully returned a pose |
GetVelocity()
The local velocity of the pose relative to the universe origin
Declaration
public Vector3 GetVelocity()
Returns
Type | Description |
---|---|
UnityEngine.Vector3 |
RemoveOnActiveChangeListener(SteamVR_Action_Skeleton.ActiveChangeHandler)
Stops executing the function setup by the corresponding AddListener
Declaration
public void RemoveOnActiveChangeListener(SteamVR_Action_Skeleton.ActiveChangeHandler functionToStopCalling)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Skeleton.ActiveChangeHandler | functionToStopCalling | The local function that you've setup to receive update events |
RemoveOnChangeListener(SteamVR_Action_Skeleton.ChangeHandler)
Stops executing the function setup by the corresponding AddListener
Declaration
public void RemoveOnChangeListener(SteamVR_Action_Skeleton.ChangeHandler functionToStopCalling)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Skeleton.ChangeHandler | functionToStopCalling | The local function that you've setup to receive on change events |
RemoveOnDeviceConnectedChanged(SteamVR_Action_Skeleton.DeviceConnectedChangeHandler)
Stops executing the function setup by the corresponding AddListener
Declaration
public void RemoveOnDeviceConnectedChanged(SteamVR_Action_Skeleton.DeviceConnectedChangeHandler functionToStopCalling)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Skeleton.DeviceConnectedChangeHandler | functionToStopCalling | The method you would like to stop calling when a device is connected. Should take a SteamVR_Action_Pose as a param |
RemoveOnTrackingChanged(SteamVR_Action_Skeleton.TrackingChangeHandler)
Stops executing the function setup by the corresponding AddListener
Declaration
public void RemoveOnTrackingChanged(SteamVR_Action_Skeleton.TrackingChangeHandler functionToStopCalling)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Skeleton.TrackingChangeHandler | functionToStopCalling | The method you would like to stop calling when tracking has changed. Should take a SteamVR_Action_Pose as a param |
RemoveOnUpdateListener(SteamVR_Action_Skeleton.UpdateHandler)
Stops executing the function setup by the corresponding AddListener
Declaration
public void RemoveOnUpdateListener(SteamVR_Action_Skeleton.UpdateHandler functionToStopCalling)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Skeleton.UpdateHandler | functionToStopCalling | The local function that you've setup to receive update events |
RemoveOnValidPoseChanged(SteamVR_Action_Skeleton.ValidPoseChangeHandler)
Stops executing the function setup by the corresponding AddListener
Declaration
public void RemoveOnValidPoseChanged(SteamVR_Action_Skeleton.ValidPoseChangeHandler functionToStopCalling)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Skeleton.ValidPoseChangeHandler | functionToStopCalling | The method you would like to stop calling when the pose has become valid or invalid. Should take a SteamVR_Action_Pose as a param |
SetRangeOfMotion(EVRSkeletalMotionRange)
Set the range of the motion of the bones in this skeleton. Options are "With Controller" as if your hand is holding your VR controller. Or "Without Controller" as if your hand is empty. This will set the range for the following update.
Declaration
public void SetRangeOfMotion(EVRSkeletalMotionRange range)
Parameters
Type | Name | Description |
---|---|---|
EVRSkeletalMotionRange | range |
SetSkeletalTransformSpace(EVRSkeletalTransformSpace)
Sets the space that you'll get bone data back in. Options are relative to the Model and relative to the Parent bone
Declaration
public void SetSkeletalTransformSpace(EVRSkeletalTransformSpace space)
Parameters
Type | Name | Description |
---|---|---|
EVRSkeletalTransformSpace | space | the space that you'll get bone data back in. Options are relative to the Model and relative to the Parent bone. |
UpdateTransform(Transform)
Update a transform's local position and local roation to match the pose from the most recent update
Declaration
public void UpdateTransform(Transform transformToUpdate)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Transform | transformToUpdate | The transform of the object to be updated |
UpdateValue(Boolean)
[Should not be called by user code] Updates the skeleton action data
Declaration
public virtual void UpdateValue(bool skipStateAndEventUpdates)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | skipStateAndEventUpdates |
UpdateValueWithoutEvents()
[Should not be called by user code] Updates the skeleton action data without firing events
Declaration
public void UpdateValueWithoutEvents()
Events
onActiveBindingChange
Event fires when the active state of the binding changes
Declaration
public event SteamVR_Action_Skeleton.ActiveChangeHandler onActiveBindingChange
Event Type
Type | Description |
---|---|
SteamVR_Action_Skeleton.ActiveChangeHandler |
onActiveChange
Event fires when the active state (ActionSet active and binding active) changes
Declaration
public event SteamVR_Action_Skeleton.ActiveChangeHandler onActiveChange
Event Type
Type | Description |
---|---|
SteamVR_Action_Skeleton.ActiveChangeHandler |
onChange
Event fires when the state of the pose or bones moves more than the changeTolerance
Declaration
public event SteamVR_Action_Skeleton.ChangeHandler onChange
Event Type
Type | Description |
---|---|
SteamVR_Action_Skeleton.ChangeHandler |
onDeviceConnectedChanged
Event fires when the device bound to this action is connected or disconnected
Declaration
public event SteamVR_Action_Skeleton.DeviceConnectedChangeHandler onDeviceConnectedChanged
Event Type
Type | Description |
---|---|
SteamVR_Action_Skeleton.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_Skeleton.TrackingChangeHandler onTrackingChanged
Event Type
Type | Description |
---|---|
SteamVR_Action_Skeleton.TrackingChangeHandler |
onUpdate
Event fires when the action is updated
Declaration
public event SteamVR_Action_Skeleton.UpdateHandler onUpdate
Event Type
Type | Description |
---|---|
SteamVR_Action_Skeleton.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_Skeleton.ValidPoseChangeHandler onValidPoseChanged
Event Type
Type | Description |
---|---|
SteamVR_Action_Skeleton.ValidPoseChangeHandler |
Explicit Interface Implementations
ISerializationCallbackReceiver.OnAfterDeserialize()
Declaration
void ISerializationCallbackReceiver.OnAfterDeserialize()
ISerializationCallbackReceiver.OnBeforeSerialize()
Declaration
void ISerializationCallbackReceiver.OnBeforeSerialize()