Class ARTranslationInteractable
Manipulates the position of an object via a drag gesture. If not selected, the object will be selected when the drag gesture starts.
Inheritance
Implements
Inherited Members
Namespace: UnityEngine .XR.Interaction.Toolkit.AR
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[AddComponentMenu("XR/AR Translation Interactable", 22)]
[RequireComponent(typeof(ARSelectionInteractable))]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.5/api/UnityEngine.XR.Interaction.Toolkit.AR.ARTranslationInteractable.html")]
public class ARTranslationInteractable : ARBaseGestureInteractable, IXRActivateInteractable, IXRHoverInteractable, IXRSelectInteractable, IXRFocusInteractable, IXRInteractionStrengthInteractable, IXRInteractable, IXROverridesGazeAutoSelect
Properties
fallbackLayerMask
The Layer
Declaration
public LayerMask fallbackLayerMask { get; set; }
Property Value
Type | Description |
---|---|
Layer |
maxTranslationDistance
The maximum translation distance of this object.
Declaration
public float maxTranslationDistance { get; set; }
Property Value
Type | Description |
---|---|
float |
objectGestureTranslationMode
Controls whether the object will be constrained vertically, horizontally, or free to move in all axis.
Declaration
public GestureTransformationUtility.GestureTranslationMode objectGestureTranslationMode { get; set; }
Property Value
Type | Description |
---|---|
Gesture |
Methods
CanStartManipulationForGesture(DragGesture)
Determines if the manipulation can start for the given gesture.
Declaration
protected override bool CanStartManipulationForGesture(DragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Drag |
gesture | The current gesture. |
Returns
Overrides
OnContinueManipulation(DragGesture)
Unity calls this method automatically when the manipulation continues.
Declaration
protected override void OnContinueManipulation(DragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Drag |
gesture | The current gesture. |
Overrides
See Also
OnEndManipulation(DragGesture)
Unity calls this method automatically when the manipulation ends.
Declaration
protected override void OnEndManipulation(DragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Drag |
gesture | The current gesture. |
Overrides
See Also
OnStartManipulation(DragGesture)
Unity calls this method automatically when the manipulation starts.
Declaration
protected override void OnStartManipulation(DragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
Drag |
gesture | The current gesture. |
Overrides
See Also
ProcessInteractable(UpdatePhase)
The XRInteraction
Declaration
public override void ProcessInteractable(XRInteractionUpdateOrder.UpdatePhase updatePhase)
Parameters
Type | Name | Description |
---|---|---|
XRInteraction |
updatePhase | The update phase this is called during. |
Overrides
Remarks
Please see the XRInteraction