releases/2.5.4mrtk_developmentreleases/2.1.0releases/2.2.0releases/2.3.0releases/2.4.0releases/2.5.0releases/2.5.1releases/2.5.2releases/2.5.3
  • Guides
  • API Documentation

We've moved!

Starting from MRTK 2.6, we are publishing both conceptual docs and API references on docs.microsoft.com. For conceptual docs, please visit our new landing page. For API references, please visit the MRTK-Unity section of the dot net API explorer. Existing content will remain here but will not be updated further.

  • API Documentation

    Show / Hide Table of Contents

    Class TwoHandScaleLogic

    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.

    Inheritance
    Object
    TwoHandScaleLogic
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.MixedReality.Toolkit.Physics
    Assembly: cs.temp.dll.dll
    Syntax
    public class TwoHandScaleLogic

    Methods

    Setup(Dictionary<UInt32, Vector3>, Transform)

    Initialize system with source info from controllers/hands

    Declaration
    public virtual void Setup(Dictionary<uint, Vector3> handsPressedMap, Transform manipulationRoot)
    Parameters
    Type Name Description
    Dictionary<UInt32, Vector3> handsPressedMap

    Dictionary that maps inputSources to states

    Transform manipulationRoot

    Transform of gameObject to be manipulated

    UpdateMap(Dictionary<UInt32, Vector3>)

    update GameObject with new Scale state

    Declaration
    public virtual Vector3 UpdateMap(Dictionary<uint, Vector3> handsPressedMap)
    Parameters
    Type Name Description
    Dictionary<UInt32, Vector3> handsPressedMap
    Returns
    Type Description
    Vector3

    a Vector3 describing the new Scale of the object being manipulated

    In This Article
    • Methods
      • Setup(Dictionary<UInt32, Vector3>, Transform)
      • UpdateMap(Dictionary<UInt32, Vector3>)
    Back to top Generated by DocFX