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.

    Show / Hide Table of Contents

    Class TwoHandRotateLogic

    Implements common logic for rotating holograms using a handlebar metaphor. each frame, object_rotation_delta = rotation_delta(current_hands_vector, previous_hands_vector) where hands_vector is the vector between two hand/controller positions.

    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
    TwoHandRotateLogic
    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 TwoHandRotateLogic

    Methods

    Setup(Dictionary<UInt32, Vector3>, Transform, RotationConstraintType)

    Setup the rotation logic.

    Declaration
    public void Setup(Dictionary<uint, Vector3> handsPressedMap, Transform t, RotationConstraintType rotationConstraint)
    Parameters
    Type Name Description
    Dictionary<UInt32, Vector3> handsPressedMap
    Transform t
    RotationConstraintType rotationConstraint

    Update(Dictionary<UInt32, Vector3>, Quaternion, RotationConstraintType)

    Update the rotation based on input.

    Declaration
    public Quaternion Update(Dictionary<uint, Vector3> handsPressedMap, Quaternion currentRotation, RotationConstraintType rotationConstraint)
    Parameters
    Type Name Description
    Dictionary<UInt32, Vector3> handsPressedMap
    Quaternion currentRotation
    RotationConstraintType rotationConstraint
    Returns
    Type Description
    Quaternion

    Desired rotation

    Back to top Generated by DocFX