Class ARGestureInteractor
The ARGestureInteractor allows the user to manipulate virtual objects (select, translate, rotate, scale, and elevate) through gestures (tap, drag, twist, and pinch).
Inherited Members
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
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
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
OnDisable()
Declaration
protected override void OnDisable()
Overrides
OnEnable()
See
Declaration
protected override void OnEnable()
Overrides
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
Remarks
args is only valid during this method call, do not hold a reference to it.
See Also
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
Remarks
args is only valid during this method call, do not hold a reference to it.
See Also
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
PushARSessionOrigin()
Passes the arSessionOrigin to the Gesture Recognizers.
Declaration
protected virtual void PushARSessionOrigin()
See Also
Reset()
See
Declaration
protected override void Reset()
Overrides
UpdateGestureRecognizers()
Update all Gesture Recognizers.
Declaration
protected virtual void UpdateGestureRecognizers()