Method GetFrontJointID
GetFrontJointID(XRHandFingerID)
Gets the metacarpal XRHandJointID of a given XRHandFingerID.
Declaration
public static XRHandJointID GetFrontJointID(this XRHandFingerID fingerId)
Parameters
Type | Name | Description |
---|---|---|
XRHandFingerID | fingerId | ID of the finger of which you want the first XRHandJointID. |
Returns
Type | Description |
---|---|
XRHandJointID | First XRHandJointID for the given finger in an XRHand object's list of joints. |
Examples
You can use GetFrontJointID
and GetBackJointID(XRHandFingerID) to iterate
through the joints of a specific finger:
for(var i = XRHandFingerID.Thumb.GetFrontJointID().ToIndex(); // metacarpal
i <= XRHandFingerID.Thumb.GetBackJointID().ToIndex(); // tip
i++)
{
// hand is an XRHand object
XRHandJoint fingerJoint = hand.GetJoint(XRHandJointIDUtility.FromIndex(i));
// Use data...
}