Skip to content

Commit beb760c

Browse files
Refactor tests to use positions instead of hardcoded numbers
1 parent 0698c13 commit beb760c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

com.unity.ml-agents.extensions/Tests/Runtime/Sensors/RigidBodySensorTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ public void TestBodiesWithJoint()
104104
{
105105
// Model space
106106
0f, 0f, 0f, // Root pos
107-
13.37f, 0f, 0f, // Middle pos
107+
middleGamObj.transform.position.x, 0f, 0f, // Middle pos
108108
leafGameObj.transform.position.x, 0f, 0f, // Leaf pos
109109

110110
// Local space
111111
0f, 0f, 0f, // Root pos
112-
13.37f, 0f, 0f, // Attached pos
113-
4.2f, 0f, 0f, // Leaf pos
112+
middleGamObj.transform.localPosition.x, 0f, 0f, // Attached pos
113+
leafGameObj.transform.localPosition.x, 0f, 0f, // Leaf pos
114114

115115
1f, 0f, 0f, // Root vel (relative to virtual root)
116116
-1f, 1f, 0f, // Attached vel

0 commit comments

Comments
 (0)