From 4b5a14d3df338eae905b76681ce537b8f8637369 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 11 May 2026 22:02:13 +0200 Subject: [PATCH] Update runtime interaction tests for target coordinates and range validation --- tests/unit/runtime-interaction-system.test.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/unit/runtime-interaction-system.test.ts b/tests/unit/runtime-interaction-system.test.ts index f170bf67..b771fef1 100644 --- a/tests/unit/runtime-interaction-system.test.ts +++ b/tests/unit/runtime-interaction-system.test.ts @@ -303,16 +303,20 @@ describe("runtime interaction targeting", () => { entityId: topNpc.entityId })?.center.y ).toBeCloseTo(3.6); + const customCenter = resolveRuntimeTargetReference(scene, { + kind: "npc", + entityId: customNpc.entityId + })?.center; + + expect(customCenter?.x).toBeCloseTo(14); + expect(customCenter?.y).toBeCloseTo(1.5); + expect(customCenter?.z).toBeCloseTo(3); expect( resolveRuntimeTargetReference(scene, { kind: "npc", entityId: customNpc.entityId - })?.center - ).toMatchObject({ - x: 14, - y: 1.5, - z: 3 - }); + })?.range + ).toBeGreaterThan(0); }); it("captures off-center targets without ray dead zones", () => {