docs.unity3d.com
    Show / Hide Table of Contents

    Class TwoFingerDragGesture

    Gesture for when the user performs a two finger vertical swipe motion on the touch screen.

    Inheritance
    Object
    Gesture<TwoFingerDragGesture>
    TwoFingerDragGesture
    Inherited Members
    Gesture<TwoFingerDragGesture>.onStart
    Gesture<TwoFingerDragGesture>.onUpdated
    Gesture<TwoFingerDragGesture>.onFinished
    Gesture<TwoFingerDragGesture>.isCanceled
    Gesture<TwoFingerDragGesture>.targetObject
    Gesture<TwoFingerDragGesture>.recognizer
    Gesture<TwoFingerDragGesture>.Complete()
    Gesture<TwoFingerDragGesture>.WasCancelled
    Gesture<TwoFingerDragGesture>.TargetObject
    Gesture<TwoFingerDragGesture>.m_Recognizer
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.XR.Interaction.Toolkit.AR
    Syntax
    public class TwoFingerDragGesture : Gesture<TwoFingerDragGesture>

    Constructors

    TwoFingerDragGesture(TwoFingerDragGestureRecognizer, Touch, Touch)

    Initializes and returns an instance of TwoFingerDragGesture.

    Declaration
    public TwoFingerDragGesture(TwoFingerDragGestureRecognizer recognizer, Touch touch1, Touch touch2)
    Parameters
    Type Name Description
    TwoFingerDragGestureRecognizer recognizer

    The gesture recognizer.

    Touch touch1

    The first touch that started this gesture.

    Touch touch2

    The second touch that started this gesture.

    TwoFingerDragGesture(TwoFingerDragGestureRecognizer, Touch, Touch)

    Initializes and returns an instance of TwoFingerDragGesture.

    Declaration
    public TwoFingerDragGesture(TwoFingerDragGestureRecognizer recognizer, Touch touch1, Touch touch2)
    Parameters
    Type Name Description
    TwoFingerDragGestureRecognizer recognizer

    The gesture recognizer.

    Touch touch1

    The first touch that started this gesture.

    Touch touch2

    The second touch that started this gesture.

    Properties

    delta

    (Read Only) The delta screen position of the gesture.

    Declaration
    public Vector2 delta { get; }
    Property Value
    Type Description
    Vector2

    Delta

    (Read Only) The delta screen position of the gesture.

    Declaration
    [Obsolete("Delta has been deprecated. Use delta instead. (UnityUpgradable) -> delta")]
    public Vector2 Delta { get; }
    Property Value
    Type Description
    Vector2
    Remarks

    Delta has been deprecated. Use delta instead.

    dragRecognizer

    (Read Only) The gesture recognizer.

    Declaration
    protected TwoFingerDragGestureRecognizer dragRecognizer { get; }
    Property Value
    Type Description
    TwoFingerDragGestureRecognizer

    fingerId1

    (Read Only) The id of the first finger used in this gesture.

    Declaration
    public int fingerId1 { get; }
    Property Value
    Type Description
    Int32

    FingerId1

    (Read Only) The id of the first finger used in this gesture.

    Declaration
    [Obsolete("FingerId1 has been deprecated. Use fingerId1 instead. (UnityUpgradable) -> fingerId1")]
    public int FingerId1 { get; }
    Property Value
    Type Description
    Int32
    Remarks

    FingerId1 has been deprecated. Use fingerId1 instead.

    fingerId2

    (Read Only) The id of the second finger used in this gesture.

    Declaration
    public int fingerId2 { get; }
    Property Value
    Type Description
    Int32

    FingerId2

    (Read Only) The id of the second finger used in this gesture.

    Declaration
    [Obsolete("FingerId2 has been deprecated. Use fingerId2 instead. (UnityUpgradable) -> fingerId2")]
    public int FingerId2 { get; }
    Property Value
    Type Description
    Int32
    Remarks

    FingerId2 has been deprecated. Use fingerId2 instead.

    position

    (Read Only) The current screen position of the gesture.

    Declaration
    public Vector2 position { get; }
    Property Value
    Type Description
    Vector2

    Position

    (Read Only) The current screen position of the gesture.

    Declaration
    [Obsolete("Position has been deprecated. Use position instead. (UnityUpgradable) -> position")]
    public Vector2 Position { get; }
    Property Value
    Type Description
    Vector2
    Remarks

    Position has been deprecated. Use position instead.

    startPosition1

    (Read Only) The screen position of the first finger where the gesture started.

    Declaration
    public Vector2 startPosition1 { get; }
    Property Value
    Type Description
    Vector2

    StartPosition1

    (Read Only) The screen position of the first finger where the gesture started.

    Declaration
    [Obsolete("StartPosition1 has been deprecated. Use startPosition1 instead. (UnityUpgradable) -> startPosition1")]
    public Vector2 StartPosition1 { get; }
    Property Value
    Type Description
    Vector2
    Remarks

    StartPosition1 has been deprecated. Use startPosition1 instead.

    startPosition2

    (Read Only) The screen position of the second finger where the gesture started.

    Declaration
    public Vector2 startPosition2 { get; }
    Property Value
    Type Description
    Vector2

    StartPosition2

    (Read Only) The screen position of the second finger where the gesture started.

    Declaration
    [Obsolete("StartPosition2 has been deprecated. Use startPosition2 instead. (UnityUpgradable) -> startPosition2")]
    public Vector2 StartPosition2 { get; }
    Property Value
    Type Description
    Vector2
    Remarks

    StartPosition2 has been deprecated. Use startPosition2 instead.

    Methods

    CanStart()

    Returns true if this gesture can start.

    Declaration
    protected override bool CanStart()
    Returns
    Type Description
    Boolean

    Returns true if the gesture can start. Otherwise, returns false.

    Overrides
    UnityEngine.XR.Interaction.Toolkit.AR.Gesture<UnityEngine.XR.Interaction.Toolkit.AR.TwoFingerDragGesture>.CanStart()

    OnCancel()

    This method is called automatically when this gesture is canceled.

    Declaration
    protected override void OnCancel()
    Overrides
    UnityEngine.XR.Interaction.Toolkit.AR.Gesture<UnityEngine.XR.Interaction.Toolkit.AR.TwoFingerDragGesture>.OnCancel()
    Remarks

    When canceled, this method is called right before OnFinish(), which is still invoked.

    OnFinish()

    This method is called automatically when this gesture is finished.

    Declaration
    protected override void OnFinish()
    Overrides
    UnityEngine.XR.Interaction.Toolkit.AR.Gesture<UnityEngine.XR.Interaction.Toolkit.AR.TwoFingerDragGesture>.OnFinish()

    OnStart()

    This method is called automatically when this gesture is started.

    Declaration
    protected override void OnStart()
    Overrides
    UnityEngine.XR.Interaction.Toolkit.AR.Gesture<UnityEngine.XR.Interaction.Toolkit.AR.TwoFingerDragGesture>.OnStart()

    UpdateGesture()

    Updates this gesture.

    Declaration
    protected override bool UpdateGesture()
    Returns
    Type Description
    Boolean

    Returns true if the update was successful. Otherwise, returns false.

    Overrides
    UnityEngine.XR.Interaction.Toolkit.AR.Gesture<UnityEngine.XR.Interaction.Toolkit.AR.TwoFingerDragGesture>.UpdateGesture()
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023