Update runtime interaction tests for target coordinates and range validation
This commit is contained in:
@@ -303,16 +303,20 @@ describe("runtime interaction targeting", () => {
|
|||||||
entityId: topNpc.entityId
|
entityId: topNpc.entityId
|
||||||
})?.center.y
|
})?.center.y
|
||||||
).toBeCloseTo(3.6);
|
).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(
|
expect(
|
||||||
resolveRuntimeTargetReference(scene, {
|
resolveRuntimeTargetReference(scene, {
|
||||||
kind: "npc",
|
kind: "npc",
|
||||||
entityId: customNpc.entityId
|
entityId: customNpc.entityId
|
||||||
})?.center
|
})?.range
|
||||||
).toMatchObject({
|
).toBeGreaterThan(0);
|
||||||
x: 14,
|
|
||||||
y: 1.5,
|
|
||||||
z: 3
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("captures off-center targets without ray dead zones", () => {
|
it("captures off-center targets without ray dead zones", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user