|
10 | 10 | using System.Collections.Concurrent; |
11 | 11 | using UnityEngine; |
12 | 12 | using UnityEngine.InputSystem; |
13 | | -using UnityEngine.XR.Interaction.Toolkit; |
14 | 13 |
|
15 | 14 | using Object = UnityEngine.Object; |
16 | 15 |
|
|
22 | 21 |
|
23 | 22 | namespace MixedReality.Toolkit.Input.Tests |
24 | 23 | { |
25 | | - public class InputTestUtilities |
| 24 | + public static class InputTestUtilities |
26 | 25 | { |
27 | 26 | private const string MRTKRigPrefabGuid = "4d7e2f87fefe0ba468719b15288b46e7"; |
28 | 27 | private static readonly string MRTKRigPrefabPath = AssetDatabase.GUIDToAssetPath(MRTKRigPrefabGuid); |
@@ -59,7 +58,7 @@ public class InputTestUtilities |
59 | 58 | /// to ensure that tests will run quickly in general, and can be set to true manually in specific |
60 | 59 | /// test cases using the example below. |
61 | 60 | /// </summary> |
62 | | - /// <example> |
| 61 | + /// <example> |
63 | 62 | /// <code> |
64 | 63 | /// [UnityTest] |
65 | 64 | /// public IEnumerator YourTestCase() |
@@ -221,7 +220,7 @@ public static void TeardownRig() |
221 | 220 | /// </summary> |
222 | 221 | /// <remarks> |
223 | 222 | /// This will create two <see cref="SimulatedController"/> object, a <see cref="SimulatedHMD"/> |
224 | | - /// object, and the associated <see cref="ControllerControls"/> objects. |
| 223 | + /// object, and the associated <see cref="ControllerControls"/> objects. |
225 | 224 | /// </remarks> |
226 | 225 | /// <param name="rayHalfLife"> |
227 | 226 | /// Optional value for ray smoothing halflife, handy for suppressing smoothing during automated tests. |
@@ -300,7 +299,7 @@ public static IEnumerator SetHandTrackingState(Handedness handedness, bool isTra |
300 | 299 | /// </summary> |
301 | 300 | /// <remarks> |
302 | 301 | /// <para> |
303 | | - /// This moves the hand from <paramref name="startPosition"/> to <paramref name="endPosition"/>, rotates the hand from |
| 302 | + /// This moves the hand from <paramref name="startPosition"/> to <paramref name="endPosition"/>, rotates the hand from |
304 | 303 | /// <paramref name="startRotation"/> to <paramref name="endRotation"/>, and smooths the handshape |
305 | 304 | /// based on the provided <paramref name="handshapeId"/> over the number of steps provided by <paramref name="numSteps"/>. |
306 | 305 | /// </para> |
@@ -411,7 +410,7 @@ public static IEnumerator RotateHand( |
411 | 410 | /// </summary> |
412 | 411 | /// <remarks> |
413 | 412 | /// <para> |
414 | | - /// This rotates the hand to <paramref name="newRotation"/>, and smooths the handshape based on the provided |
| 413 | + /// This rotates the hand to <paramref name="newRotation"/>, and smooths the handshape based on the provided |
415 | 414 | /// <paramref name="handshapeId"/> over the number of steps provided by <paramref name="numSteps"/>. |
416 | 415 | /// </para> |
417 | 416 | /// <para> |
@@ -453,7 +452,7 @@ public static IEnumerator PointHandToTarget(Vector3 target, HandshapeId handshap |
453 | 452 | /// </summary> |
454 | 453 | /// <remarks> |
455 | 454 | /// <para> |
456 | | - /// This smooths the handshape based on the provided/ <paramref name="handshapeId"/> over the number of |
| 455 | + /// This smooths the handshape based on the provided/ <paramref name="handshapeId"/> over the number of |
457 | 456 | /// steps provided by <paramref name="numSteps"/>. |
458 | 457 | /// </para> |
459 | 458 | /// <para> |
@@ -711,7 +710,7 @@ public enum RigVersion |
711 | 710 | /// Force the use of a rig that does not use the deprecated XRI controller components, but still utilizes |
712 | 711 | /// all the custom MRTK interactors. |
713 | 712 | /// </summary> |
714 | | - Version2 = 2, |
| 713 | + Version2 = 2, |
715 | 714 | } |
716 | 715 |
|
717 | 716 | /// <summary> |
@@ -831,6 +830,7 @@ public bool Update() |
831 | 830 | ); |
832 | 831 | float pinchAmount = Mathf.Lerp(startingPinchAmount, isPinching ? 1 : 0, t); |
833 | 832 |
|
| 833 | + request.controls.TriggerButton = pinchAmount >= InputSystem.settings.defaultButtonPressPoint; |
834 | 834 | request.controls.TriggerAxis = pinchAmount; |
835 | 835 | switch (request.anchorPoint) |
836 | 836 | { |
|
0 commit comments