From 27297336f5d05c777a13f11c5aaa2366977c6ae6 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 13 May 2026 16:12:40 +0200 Subject: [PATCH] Update test data and assertions for varied terrain in RapierCollisionWorld tests --- tests/domain/rapier-collision-world.test.ts | 42 ++++++++++----------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/tests/domain/rapier-collision-world.test.ts b/tests/domain/rapier-collision-world.test.ts index 967e5063..12cd828e 100644 --- a/tests/domain/rapier-collision-world.test.ts +++ b/tests/domain/rapier-collision-world.test.ts @@ -1057,21 +1057,21 @@ describe("RapierCollisionWorld", () => { sampleCountZ: 3, cellSize: 2, heights: [ - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1 + 0, + 0.1, + 0.2, + 0.3, + 0.4, + 0, + 0.1, + 0.2, + 0.3, + 0.4, + 0, + 0.1, + 0.2, + 0.3, + 0.4 ] }); const runtimeScene = buildRuntimeSceneFromDocument({ @@ -1114,17 +1114,13 @@ describe("RapierCollisionWorld", () => { }, runtimeScene.playerCollider ); - console.log({ - eastLanding, - westLanding - }); expect(eastLanding.grounded).toBe(true); - expect(eastLanding.feetPosition.y).toBeGreaterThan(0.9); - expect(eastLanding.feetPosition.y).toBeLessThan(1.1); + expect(eastLanding.feetPosition.y).toBeGreaterThan(0.39); + expect(eastLanding.feetPosition.y).toBeLessThan(0.41); expect(westLanding.grounded).toBe(true); - expect(westLanding.feetPosition.y).toBeGreaterThan(0.9); - expect(westLanding.feetPosition.y).toBeLessThan(1.1); + expect(westLanding.feetPosition.y).toBeGreaterThan(0.04); + expect(westLanding.feetPosition.y).toBeLessThan(0.06); } finally { collisionWorld.dispose(); }