Update runtime interaction target assertions to use full target object reference

This commit is contained in:
2026-05-11 22:02:25 +02:00
parent 4b5a14d3df
commit df6fecd3e5

View File

@@ -303,20 +303,14 @@ describe("runtime interaction targeting", () => {
entityId: topNpc.entityId entityId: topNpc.entityId
})?.center.y })?.center.y
).toBeCloseTo(3.6); ).toBeCloseTo(3.6);
const customCenter = resolveRuntimeTargetReference(scene, { const customTarget = resolveRuntimeTargetReference(scene, {
kind: "npc", kind: "npc",
entityId: customNpc.entityId entityId: customNpc.entityId
})?.center; });
expect(customCenter?.x).toBeCloseTo(14); expect(customTarget?.center.x).toBeCloseTo(14);
expect(customCenter?.y).toBeCloseTo(1.5); expect(customTarget?.center.y).toBeCloseTo(1.5);
expect(customCenter?.z).toBeCloseTo(3); expect(customTarget?.center.z).toBeCloseTo(3);
expect(
resolveRuntimeTargetReference(scene, {
kind: "npc",
entityId: customNpc.entityId
})?.range
).toBeGreaterThan(0);
}); });
it("captures off-center targets without ray dead zones", () => { it("captures off-center targets without ray dead zones", () => {