Language
Edit

ScaleLogic Class

Definition

Implements a scale logic that will scale an object based on the ratio of the distance between hands. object_scale = start_object_scale * curr_hand_dist / start_hand_dist

Usage: When a manipulation starts, call Setup. Call Update any time to update the move logic and get a new rotation for the object.

public class ScaleLogic : MixedReality.Toolkit.SpatialManipulation.ManipulationLogic<UnityEngine.Vector3>
type ScaleLogic = class
    inherit ManipulationLogic<Vector3>
Public Class ScaleLogic
Inherits ManipulationLogic(Of Vector3)
Inheritance
ManipulationLogic<UnityEngine.Vector3>
ScaleLogic

Constructors

Name Description
ScaleLogic()

Properties

Name Description
ForceGrabbed

Whether the object is force grabbed by a singular UnityEngine.XR.Interaction.Toolkit.XRRayInteractor.

(Inherited from ManipulationLogic<T>)
NumInteractors

The number of UnityEngine.XR.Interaction.Toolkit.IXRSelectInteractor objects currently selecting this object.

(Inherited from ManipulationLogic<T>)
SelectedBySocket

Whether the object is selected by a singular UnityEngine.XR.Interaction.Toolkit.XRSocketInteractor.

(Inherited from ManipulationLogic<T>)

Methods

Name Description
Setup(List<IXRSelectInteractor>, IXRSelectInteractable, MixedRealityTransform)

Setup the manipulation logic. Called automatically by Update if the number of interactor points has changed.

Update(List<IXRSelectInteractor>, IXRSelectInteractable, MixedRealityTransform, Boolean)

Calculate the new manipulation result, of type T, based on input. If the number of interactor points is different than the last time Update was called, Setup will be called automatically to re-initialize the manipulation.

Applies to