docs.unity3d.com
    Show / Hide Table of Contents

    Class ARGestureInteractor

    The ARGestureInteractor allows the user to manipulate virtual objects (select, translate, rotate, scale, and elevate) through gestures (tap, drag, twist, and pinch).

    Inheritance
    Object
    XRBaseInteractor
    ARGestureInteractor
    Inherited Members
    XRBaseInteractor.registered
    XRBaseInteractor.unregistered
    XRBaseInteractor.interactionManager
    XRBaseInteractor.interactionLayerMask
    XRBaseInteractor.attachTransform
    XRBaseInteractor.startingSelectedInteractable
    XRBaseInteractor.hoverEntered
    XRBaseInteractor.hoverExited
    XRBaseInteractor.selectEntered
    XRBaseInteractor.selectExited
    XRBaseInteractor.allowHover
    XRBaseInteractor.allowSelect
    XRBaseInteractor.isPerformingManualInteraction
    XRBaseInteractor.selectTarget
    XRBaseInteractor.hoverTargets
    XRBaseInteractor.Start()
    XRBaseInteractor.OnDestroy()
    XRBaseInteractor.GetHoverTargets(List<XRBaseInteractable>)
    XRBaseInteractor.isHoverActive
    XRBaseInteractor.isSelectActive
    XRBaseInteractor.CanHover(XRBaseInteractable)
    XRBaseInteractor.CanSelect(XRBaseInteractable)
    XRBaseInteractor.requireSelectExclusive
    XRBaseInteractor.selectedInteractableMovementTypeOverride
    XRBaseInteractor.OnHoverEntering(HoverEnterEventArgs)
    XRBaseInteractor.OnHoverEntered(HoverEnterEventArgs)
    XRBaseInteractor.OnHoverExiting(HoverExitEventArgs)
    XRBaseInteractor.OnHoverExited(HoverExitEventArgs)
    XRBaseInteractor.OnSelectEntering(SelectEnterEventArgs)
    XRBaseInteractor.OnSelectEntered(SelectEnterEventArgs)
    XRBaseInteractor.OnSelectExiting(SelectExitEventArgs)
    XRBaseInteractor.OnSelectExited(SelectExitEventArgs)
    XRBaseInteractor.StartManualInteraction(XRBaseInteractable)
    XRBaseInteractor.EndManualInteraction()
    XRBaseInteractor.enableInteractions
    XRBaseInteractor.onHoverEntered
    XRBaseInteractor.onHoverExited
    XRBaseInteractor.onSelectEntered
    XRBaseInteractor.onSelectExited
    XRBaseInteractor.onHoverEnter
    XRBaseInteractor.onHoverExit
    XRBaseInteractor.onSelectEnter
    XRBaseInteractor.onSelectExit
    XRBaseInteractor.OnHoverEntering(XRBaseInteractable)
    XRBaseInteractor.OnHoverEntered(XRBaseInteractable)
    XRBaseInteractor.OnHoverExiting(XRBaseInteractable)
    XRBaseInteractor.OnHoverExited(XRBaseInteractable)
    XRBaseInteractor.OnSelectEntering(XRBaseInteractable)
    XRBaseInteractor.OnSelectEntered(XRBaseInteractable)
    XRBaseInteractor.OnSelectExiting(XRBaseInteractable)
    XRBaseInteractor.OnSelectExited(XRBaseInteractable)
    Namespace: UnityEngine.XR.Interaction.Toolkit.AR
    Syntax
    public class ARGestureInteractor : XRBaseInteractor
    Remarks

    To make use of this, add an ARGestureInteractor to your scene and an ARBaseGestureInteractable to any of your virtual objects.

    Properties

    arSessionOrigin

    The that this Interactor will use (such as to get the or to transform from Session space). Will find one if null.

    Declaration
    public ARSessionOrigin arSessionOrigin { get; set; }
    Property Value
    Type Description
    ARSessionOrigin

    dragGestureRecognizer

    (Read Only) The Drag gesture recognizer.

    Declaration
    public DragGestureRecognizer dragGestureRecognizer { get; }
    Property Value
    Type Description
    DragGestureRecognizer

    DragGestureRecognizer

    (Read Only) The Drag gesture recognizer.

    Declaration
    public DragGestureRecognizer DragGestureRecognizer { get; }
    Property Value
    Type Description
    DragGestureRecognizer

    instance

    (Read Only) The ARGestureInteractor instance.

    Declaration
    public static ARGestureInteractor instance { get; }
    Property Value
    Type Description
    ARGestureInteractor

    Instance

    (Read Only) The ARGestureInteractor instance.

    Declaration
    public static ARGestureInteractor Instance { get; }
    Property Value
    Type Description
    ARGestureInteractor

    pinchGestureRecognizer

    (Read Only) The Pinch gesture recognizer.

    Declaration
    public PinchGestureRecognizer pinchGestureRecognizer { get; }
    Property Value
    Type Description
    PinchGestureRecognizer

    PinchGestureRecognizer

    (Read Only) The Pinch gesture recognizer.

    Declaration
    public PinchGestureRecognizer PinchGestureRecognizer { get; }
    Property Value
    Type Description
    PinchGestureRecognizer

    tapGestureRecognizer

    (Read Only) The Tap gesture recognizer.

    Declaration
    public TapGestureRecognizer tapGestureRecognizer { get; }
    Property Value
    Type Description
    TapGestureRecognizer

    TapGestureRecognizer

    (Read Only) The Tap gesture recognizer.

    Declaration
    public TapGestureRecognizer TapGestureRecognizer { get; }
    Property Value
    Type Description
    TapGestureRecognizer

    twistGestureRecognizer

    (Read Only) The Twist gesture recognizer.

    Declaration
    public TwistGestureRecognizer twistGestureRecognizer { get; }
    Property Value
    Type Description
    TwistGestureRecognizer

    TwistGestureRecognizer

    (Read Only) The Twist gesture recognizer.

    Declaration
    public TwistGestureRecognizer TwistGestureRecognizer { get; }
    Property Value
    Type Description
    TwistGestureRecognizer

    twoFingerDragGestureRecognizer

    (Read Only) The two finger drag gesture recognizer.

    Declaration
    public TwoFingerDragGestureRecognizer twoFingerDragGestureRecognizer { get; }
    Property Value
    Type Description
    TwoFingerDragGestureRecognizer

    TwoFingerDragGestureRecognizer

    (Read Only) The two finger drag gesture recognizer.

    Declaration
    public TwoFingerDragGestureRecognizer TwoFingerDragGestureRecognizer { get; }
    Property Value
    Type Description
    TwoFingerDragGestureRecognizer

    Methods

    Awake()

    See .

    Declaration
    protected override void Awake()
    Overrides
    XRBaseInteractor.Awake()

    GetValidTargets(List<XRBaseInteractable>)

    Retrieve the list of Interactables that this Interactor could possibly interact with this frame. This list is sorted by priority (with highest priority first).

    Declaration
    public override void GetValidTargets(List<XRBaseInteractable> validTargets)
    Parameters
    Type Name Description
    List<XRBaseInteractable> validTargets
    Overrides
    XRBaseInteractor.GetValidTargets(List<XRBaseInteractable>)

    OnDisable()

    Declaration
    protected override void OnDisable()
    Overrides
    XRBaseInteractor.OnDisable()

    OnEnable()

    See .

    Declaration
    protected override void OnEnable()
    Overrides
    XRBaseInteractor.OnEnable()

    OnRegistered(InteractorRegisteredEventArgs)

    This method is called by the Interaction Manager when this Interactor is registered with it.

    Declaration
    protected override void OnRegistered(InteractorRegisteredEventArgs args)
    Parameters
    Type Name Description
    InteractorRegisteredEventArgs args

    Event data containing the Interaction Manager that registered this Interactor.

    Overrides
    XRBaseInteractor.OnRegistered(InteractorRegisteredEventArgs)
    Remarks

    args is only valid during this method call, do not hold a reference to it.

    See Also
    RegisterInteractor(XRBaseInteractor)

    OnUnregistered(InteractorUnregisteredEventArgs)

    This method is called by the Interaction Manager when this Interactor is unregistered from it.

    Declaration
    protected override void OnUnregistered(InteractorUnregisteredEventArgs args)
    Parameters
    Type Name Description
    InteractorUnregisteredEventArgs args

    Event data containing the Interaction Manager that unregistered this Interactor.

    Overrides
    XRBaseInteractor.OnUnregistered(InteractorUnregisteredEventArgs)
    Remarks

    args is only valid during this method call, do not hold a reference to it.

    See Also
    UnregisterInteractor(XRBaseInteractor)

    ProcessInteractor(XRInteractionUpdateOrder.UpdatePhase)

    This method is called by the Interaction Manager to update the Interactor. Please see the Interaction Manager documentation for more details on update order.

    Declaration
    public override void ProcessInteractor(XRInteractionUpdateOrder.UpdatePhase updatePhase)
    Parameters
    Type Name Description
    XRInteractionUpdateOrder.UpdatePhase updatePhase

    The update phase this is called during.

    Overrides
    XRBaseInteractor.ProcessInteractor(XRInteractionUpdateOrder.UpdatePhase)

    PushARSessionOrigin()

    Passes the arSessionOrigin to the Gesture Recognizers.

    Declaration
    protected virtual void PushARSessionOrigin()
    See Also
    arSessionOrigin

    Reset()

    See .

    Declaration
    protected override void Reset()
    Overrides
    XRBaseInteractor.Reset()

    UpdateGestureRecognizers()

    Update all Gesture Recognizers.

    Declaration
    protected virtual void UpdateGestureRecognizers()
    See Also
    Update()
    Back to top
    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