docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    XRHandRelativeOrientation.TargetCondition
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)