From cf492d686432c593eb83124a10b011449df2d253 Mon Sep 17 00:00:00 2001 From: Juan Cruz Fortunatti Date: Tue, 21 Jul 2026 14:58:24 +0200 Subject: [PATCH] fix(website): restore FPV look angles before origin so URL-loaded view points correctly --- website/src/pages/examples/parthenon.astro | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/website/src/pages/examples/parthenon.astro b/website/src/pages/examples/parthenon.astro index 91e53545..4fa7fd9f 100644 --- a/website/src/pages/examples/parthenon.astro +++ b/website/src/pages/examples/parthenon.astro @@ -1263,9 +1263,13 @@ const description = "The Parthenon — octastyle Doric peripteral temple built f applyingState = false; setMode(st.camera === 1 ? "fpv" : "orbit"); if (st.camera === 1 && st.fpv) { - fpv.setOrigin([st.fpv.x, st.fpv.y, 1.7]); + // Set the look angles BEFORE setOrigin: setOrigin() syncs the camera + // target from the current rotX/rotY, so restoring position first would + // bake the default look into the target and the initial render would + // point the wrong way until a mouse-move re-synced it. camera.rotX = st.fpv.pitch; camera.rotY = st.fpv.yaw; + fpv.setOrigin([st.fpv.x, st.fpv.y, 1.7]); scene.rerender(); } }