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.
Inherited Members
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, Boolean)
Update the rotation based on input.
Declaration
public Quaternion Update(Dictionary<uint, Vector3> handsPressedMap, Quaternion currentRotation, RotationConstraintType rotationConstraint, bool useLocalSpaceForConstraint)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<UInt32, Vector3> | handsPressedMap | |
Quaternion | currentRotation | |
RotationConstraintType | rotationConstraint | |
Boolean | useLocalSpaceForConstraint |
Returns
Type | Description |
---|---|
Quaternion | Desired rotation |