Class XRHandRelativeOrientation.TargetCondition
A condition that can be used to check the orientation of a hand relative to some other target. The target is another transform referenced by the target property.
Inherited Members
Namespace: UnityEngine.XR.Hands.Gestures
Assembly: Unity.XR.Hands.dll
Syntax
[Serializable]
public class XRHandRelativeOrientation.TargetCondition
Remarks
To check the orientation relative to the user's head or origin, use UserOrientation to avoid the need to set a specific target transform per condition.
Properties
alignmentCondition
The XRHandAlignmentCondition used to evaluate the condition.
Declaration
public XRHandAlignmentCondition alignmentCondition { get; set; }
Property Value
Type | Description |
---|---|
XRHandAlignmentCondition |
angleTolerance
If the alignmentCondition is AlignsWith, this is the maximum angle between the handAxis and the reference direction for the condition to be met.
If the alignmentCondition is OppositeTo, this is the maximum angle between the handAxis and the opposite of the reference direction for the condition to be met.
If the alignmentCondition is PerpendicularTo, this is the maximum angle difference from 90 degrees (perpendicular) between the handAxis and the reference direction for the condition to be met.
Declaration
public float angleTolerance { get; set; }
Property Value
Type | Description |
---|---|
float |
handAxis
The XRHandAxis that is used to compare to the direction relative to the target.
Declaration
public XRHandAxis handAxis { get; set; }
Property Value
Type | Description |
---|---|
XRHandAxis |
ignorePositionY
If enabled, the Y position will be ignored when referencing a direction relative to another position.
Declaration
public bool ignorePositionY { get; set; }
Property Value
Type | Description |
---|---|
bool |
referenceDirection
The XRHandTargetRelativeDirection to compare to the handAxis for this condition.
Declaration
public XRHandTargetRelativeDirection referenceDirection { get; set; }
Property Value
Type | Description |
---|---|
XRHandTargetRelativeDirection |