From 3afa71396bd168de36a741d097ae3c5be52b60a2 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sat, 11 Apr 2026 11:20:27 +0200 Subject: [PATCH] Add test for authored Player Start navigation mode in third-person scenes --- tests/domain/build-runtime-scene.test.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/domain/build-runtime-scene.test.ts b/tests/domain/build-runtime-scene.test.ts index 84107da4..234fd2f6 100644 --- a/tests/domain/build-runtime-scene.test.ts +++ b/tests/domain/build-runtime-scene.test.ts @@ -654,6 +654,26 @@ describe("buildRuntimeSceneFromDocument", () => { ).toThrow("First-person run requires an authored Player Start"); }); + it("uses the authored Player Start navigation mode for third-person scenes", () => { + const playerStart = createPlayerStartEntity({ + id: "entity-player-start-third-person", + navigationMode: "thirdPerson" + }); + + const runtimeScene = buildRuntimeSceneFromDocument({ + ...createEmptySceneDocument({ name: "Authored Third Person Scene" }), + entities: { + [playerStart.id]: playerStart + } + }); + + expect(runtimeScene.navigationMode).toBe("thirdPerson"); + expect(runtimeScene.playerStart?.navigationMode).toBe("thirdPerson"); + expect(runtimeScene.entities.playerStarts[0]?.navigationMode).toBe( + "thirdPerson" + ); + }); + it("uses a requested Scene Entry as the runtime spawn without replacing the Player Start collider", () => { const playerStart = createPlayerStartEntity({ id: "entity-player-start-main",