Class ARRotationInteractable
Manipulates the rotation of an object via a drag or a twist gesture. If an object is selected, then dragging along the horizontal axis or performing a twist gesture will rotate along the y-axis of the item.
Inheritance
Implements
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.AR
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[AddComponentMenu("XR/AR Rotation Interactable", 22)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.5/api/UnityEngine.XR.Interaction.Toolkit.AR.ARRotationInteractable.html")]
public class ARRotationInteractable : ARBaseGestureInteractable, IXRActivateInteractable, IXRHoverInteractable, IXRSelectInteractable, IXRFocusInteractable, IXRInteractionStrengthInteractable, IXRInteractable, IXROverridesGazeAutoSelect
Properties
rotationRateDegreesDrag
The rate at which Unity rotates the attached object with a drag gesture.
Declaration
public float rotationRateDegreesDrag { get; set; }
Property Value
Type | Description |
---|---|
float |
rotationRateDegreesTwist
The rate at which Unity rotates the attached object with a twist gesture.
Declaration
public float rotationRateDegreesTwist { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
CanStartManipulationForGesture(DragGesture)
Determines if the manipulation can start for the given gesture.
Declaration
protected override bool CanStartManipulationForGesture(DragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
DragGesture | gesture | The current gesture. |
Returns
Type | Description |
---|---|
bool | Returns true if the manipulation can start. Otherwise, returns false. |
Overrides
CanStartManipulationForGesture(TwistGesture)
Determines if the manipulation can start for the given gesture.
Declaration
protected override bool CanStartManipulationForGesture(TwistGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
TwistGesture | gesture | The current gesture. |
Returns
Type | Description |
---|---|
bool | Returns true if the manipulation can start. Otherwise, returns false. |
Overrides
OnContinueManipulation(DragGesture)
Rotates the object around the y-axis via a Drag gesture.
Declaration
protected override void OnContinueManipulation(DragGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
DragGesture | gesture | The current drag gesture. |
Overrides
See Also
OnContinueManipulation(TwistGesture)
Rotates the object around the y-axis via a Twist gesture.
Declaration
protected override void OnContinueManipulation(TwistGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
TwistGesture | gesture | The current twist gesture. |