Skip to content

Commit 3293ac9

Browse files
Fix face away tests
1 parent a175e88 commit 3293ac9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Assets/MixedRealityToolkit.Tests/PlayModeTests/ConstraintTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -787,31 +787,31 @@ public IEnumerator ConstrainRotationFaceUser()
787787
float checkNegative() => Vector3.Dot(testObject.transform.forward, cameraToObject());
788788

789789
TestUtilities.AssertAboutEqual(checkCollinear(), Vector3.zero, "Object not facing camera", 0.002f);
790-
Assert.Greater(checkNegative(), 0, "Object facing away");
790+
Assert.Less(checkNegative(), 0, "Object facing away");
791791

792792
// Move the hand
793793
yield return hand.Move(new Vector3(0.2f, 0.2f, 0), numHandSteps);
794794
yield return null;
795795

796796
Assert.AreNotEqual(Vector3.forward, testObject.transform.position); // ensure the object moved
797797
TestUtilities.AssertAboutEqual(checkCollinear(), Vector3.zero, "Object not facing camera", 0.002f);
798-
Assert.Greater(checkNegative(), 0, "Object facing away");
798+
Assert.Less(checkNegative(), 0, "Object facing away");
799799

800800
// Face away from user
801801
rotConstraint.FaceAway = true;
802802
yield return hand.Move(new Vector3(-0.2f, -0.2f, 0), numHandSteps);
803803
yield return null;
804804

805805
TestUtilities.AssertAboutEqual(checkCollinear(), Vector3.zero, "Object not facing camera", 0.002f);
806-
Assert.Less(checkNegative(), 0, "Object facing away");
806+
Assert.Greater(checkNegative(), 0, "Object facing away");
807807

808808
// Move the hand
809809
yield return hand.Move(new Vector3(0.2f, 0.2f, 0), numHandSteps);
810810
yield return null;
811811

812812
Assert.AreNotEqual(Vector3.forward, testObject.transform.position); // ensure the object moved
813813
TestUtilities.AssertAboutEqual(checkCollinear(), Vector3.zero, "Object not facing camera", 0.002f);
814-
Assert.Less(checkNegative(), 0, "Object facing away");
814+
Assert.Greater(checkNegative(), 0, "Object facing away");
815815
}
816816

817817
/// <summary>

0 commit comments

Comments
 (0)