Class XRFingerShapeCondition
A set of targets for the XRFingerShape values of a single XRHandFingerID.
Inherited Members
Namespace: UnityEngine.XR.Hands.Gestures
Assembly: Unity.XR.Hands.dll
Syntax
[Serializable]
public class XRFingerShapeCondition
Properties
fingerID
The finger ID that this condition applies to.
Declaration
public XRHandFingerID fingerID { get; set; }
Property Value
Type | Description |
---|---|
XRHandFingerID |
targets
Finger shape targets to check for this finger. Setting this value will update the XRFingerShapeTypes needed for this condition.
Declaration
public XRFingerShapeCondition.Target[] targets { get; set; }
Property Value
Type | Description |
---|---|
Target[] |
Methods
CheckCondition(XRHandJointsUpdatedEventArgs)
Checks if the XRFingerShape matches the targets in this condition.
Declaration
public bool CheckCondition(XRHandJointsUpdatedEventArgs eventArgs)
Parameters
Type | Name | Description |
---|---|---|
XRHandJointsUpdatedEventArgs | eventArgs | The hand joint updated event argument that contains the latest hand data. |
Returns
Type | Description |
---|---|
bool | Returns true if all the finger shape conditions are met. Otherwise, returns false. |
Remarks
The target values are checked in the order listed. The method will return false as soon as it finds one value that is different from the target by more than the tolerance.