Update test environment setup and landing position assertions in RapierCollisionWorld tests

This commit is contained in:
2026-05-13 16:11:15 +02:00
parent 889474d195
commit f3a55ca3af

View File

@@ -1057,21 +1057,21 @@ describe("RapierCollisionWorld", () => {
sampleCountZ: 3, sampleCountZ: 3,
cellSize: 2, cellSize: 2,
heights: [ heights: [
0,
1, 1,
2,
3,
4,
0,
1, 1,
2,
3,
4,
0,
1, 1,
2, 1,
3, 1,
4 1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] ]
}); });
const runtimeScene = buildRuntimeSceneFromDocument({ const runtimeScene = buildRuntimeSceneFromDocument({
@@ -1120,11 +1120,11 @@ describe("RapierCollisionWorld", () => {
}); });
expect(eastLanding.grounded).toBe(true); expect(eastLanding.grounded).toBe(true);
expect(eastLanding.feetPosition.y).toBeGreaterThan(3.9); expect(eastLanding.feetPosition.y).toBeGreaterThan(0.9);
expect(eastLanding.feetPosition.y).toBeLessThan(4.1); expect(eastLanding.feetPosition.y).toBeLessThan(1.1);
expect(westLanding.grounded).toBe(true); expect(westLanding.grounded).toBe(true);
expect(westLanding.feetPosition.y).toBeGreaterThan(0.4); expect(westLanding.feetPosition.y).toBeGreaterThan(0.9);
expect(westLanding.feetPosition.y).toBeLessThan(0.6); expect(westLanding.feetPosition.y).toBeLessThan(1.1);
} finally { } finally {
collisionWorld.dispose(); collisionWorld.dispose();
} }