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.
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.AR
Syntax
public class ARTranslationInteractable : ARBaseGestureInteractable
Properties
fallbackLayerMask
The
Declaration
public LayerMask fallbackLayerMask { get; set; }
Property Value
Type | Description |
---|---|
LayerMask |
maxTranslationDistance
The maximum translation distance of this object.
Declaration
public float maxTranslationDistance { get; set; }
Property Value
Type | Description |
---|---|
Single |
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 |
---|---|
GestureTransformationUtility.GestureTranslationMode |
Methods
CanStartManipulationForGesture(DragGesture)
Determines if the manipulation can be started for the given gesture.
Declaration
protected override bool CanStartManipulationForGesture(DragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
DragGesture | gesture | The current gesture. |
Returns
Type | Description |
---|---|
Boolean | Returns true if the manipulation can be started. Otherwise, returns false. |
Overrides
OnContinueManipulation(DragGesture)
Unity calls this method automatically when the manipulation is continued.
Declaration
protected override void OnContinueManipulation(DragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
DragGesture | gesture | The current gesture. |
Overrides
See Also
OnEndManipulation(DragGesture)
Unity calls this method automatically when the manipulation is ended.
Declaration
protected override void OnEndManipulation(DragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
DragGesture | gesture | The current gesture. |
Overrides
See Also
OnStartManipulation(DragGesture)
Unity calls this method automatically when the manipulation is started.
Declaration
protected override void OnStartManipulation(DragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
DragGesture | gesture | The current gesture. |
Overrides
See Also
ProcessInteractable(XRInteractionUpdateOrder.UpdatePhase)
This method is called by the Interaction Manager to update the Interactable. Please see the Interaction Manager documentation for more details on update order.
Declaration
public override void ProcessInteractable(XRInteractionUpdateOrder.UpdatePhase updatePhase)
Parameters
Type | Name | Description |
---|---|---|
XRInteractionUpdateOrder.UpdatePhase | updatePhase | The update phase this is called during. |