/// <summary> /// Move the hand by some given delta. /// </summary> /// <param name="delta">Amount to move the hand by.</param> /// <param name="numSteps"> /// How many frames to move over. This defaults to the "sentinel" value which tells the system /// to use the default number of steps. For more information on this value, see /// <see cref="PlayModeTestUtilities.HandMoveStepsSentinelValue"/> /// </param> public IEnumerator Move(Vector3 delta, int numSteps = PlayModeTestUtilities.HandMoveStepsSentinelValue) { for (var iter = MoveTo(position + delta, PlayModeTestUtilities.CalculateNumSteps(numSteps)); iter.MoveNext();) { yield return(iter.Current); } }
/// <summary> /// Rotates the hand to new rotation. /// </summary> /// <param name="newRotation">New rotation of hand</param> /// <param name="numSteps">Number of frames to rotate over.</param> public IEnumerator SetRotation( Quaternion newRotation, int numSteps = PlayModeTestUtilities.HandMoveStepsSentinelValue) { Quaternion oldRotation = rotation; rotation = newRotation; yield return(PlayModeTestUtilities.SetHandRotation( oldRotation, newRotation, position, gestureId, handedness, PlayModeTestUtilities.CalculateNumSteps(numSteps), simulationService)); }
/// <inheritdoc /> public override IEnumerator SetRotation( Quaternion newRotation, int numSteps = PlayModeTestUtilities.ControllerMoveStepsSentinelValue) { Quaternion oldRotation = rotation; rotation = newRotation; yield return(PlayModeTestUtilities.SetMotionControllerRotation( oldRotation, newRotation, position, buttonState, handedness, PlayModeTestUtilities.CalculateNumSteps(numSteps), simulationService)); }