Class ARScaleInteractable
Controls the scale of an object via a Pinch gesture. If an object is selected, then doing a pinch/zoom will modify the scale of the object.
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.AR
Syntax
public class ARScaleInteractable : ARBaseGestureInteractable
Properties
elasticity
Amount that the scale bounces back after hitting min/max of range.
Declaration
public float elasticity { get; set; }
Property Value
Type | Description |
---|---|
Single |
elasticRatioLimit
The limit of the elastic ratio.
Declaration
public float elasticRatioLimit { get; set; }
Property Value
Type | Description |
---|---|
Single |
maxScale
The maximum scale of the object.
Declaration
public float maxScale { get; set; }
Property Value
Type | Description |
---|---|
Single |
minScale
The minimum scale of the object.
Declaration
public float minScale { get; set; }
Property Value
Type | Description |
---|---|
Single |
sensitivity
Sensitivity to movement being translated into scale.
Declaration
public float sensitivity { get; set; }
Property Value
Type | Description |
---|---|
Single |
Methods
CanStartManipulationForGesture(PinchGesture)
Determines if the manipulation can be started for the given gesture.
Declaration
protected override bool CanStartManipulationForGesture(PinchGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
PinchGesture | gesture | The current gesture. |
Returns
Type | Description |
---|---|
Boolean | Returns true if the manipulation can be started. Otherwise, returns false. |
Overrides
OnContinueManipulation(PinchGesture)
Continues the scaling of the object.
Declaration
protected override void OnContinueManipulation(PinchGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
PinchGesture | gesture | The current gesture. |
Overrides
See Also
OnEnable()
See
Declaration
protected override void OnEnable()
Overrides
OnEndManipulation(PinchGesture)
Finishes the scaling of the object.
Declaration
protected override void OnEndManipulation(PinchGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
PinchGesture | gesture | The current gesture. |
Overrides
See Also
OnStartManipulation(PinchGesture)
Recalculates the current scale ratio in case local scale, min or max scale were changed.
Declaration
protected override void OnStartManipulation(PinchGesture gesture)
Parameters
Type | Name | Description |
---|---|---|
PinchGesture | gesture | The gesture that started this transformation. |
Overrides
See Also
OnValidate()
See
Declaration
protected void OnValidate()
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. |