The opening shot stops facing its own teleport

Two more camera flaws, read straight out of A9WK's clip against its
ledger. The reel's first run measured the leap from the camera's
uninitialized origin as a stride and FACED ALONG IT — an arbitrary
heading that landed nose-first in a wall, and counted as aimed, so the
corridor fallback never ran. A stride only turns the eyes once the
camera is real. And idle beats are rescued generally: whenever nothing
aims the eyes and they would sit staring at a wall closer than a
stride, they turn down the deepest corridor instead — so pacing into a
dead-end cell no longer parks the whole screen inside brick.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Eric Wagoner
2026-08-23 17:00:30 -04:00
co-authored by Claude Fable 5
parent c7e245a32a
commit d560aa44c3
+8 -4
View File
@@ -220,7 +220,10 @@
})(); })();
let targetFacing = camF; let targetFacing = camF;
let aimed = false; let aimed = false;
if (dist > 0.05 && !hurled) { targetFacing = Math.atan2(dy, dx); aimed = true; } // A stride turns the eyes along it — but only a REAL stride: on the
// reel's first run the camera sits at its uninitialized origin, and
// that phantom distance must not pick the opening shot's direction.
if (camReady && dist > 0.05 && !hurled) { targetFacing = Math.atan2(dy, dx); aimed = true; }
else if (aim) { else if (aim) {
targetFacing = Math.atan2(aim.y + 0.5 - ty, aim.x + 0.5 - tx); targetFacing = Math.atan2(aim.y + 0.5 - ty, aim.x + 0.5 - tx);
aimed = true; aimed = true;
@@ -236,9 +239,10 @@
aimed = true; aimed = true;
} }
} }
if (!camReady && !aimed) { if (!aimed && castRay(v, tx, ty, targetFacing).dist < 0.8) {
// The reel opens on a wizard standing still: face the longest // Nothing aims the eyes and they'd idle nose-to-brick (the opening
// corridor rather than whatever wall the default heading found. // cut, or a beat after pacing into a dead end): face the deepest
// corridor from where the wizard stands instead.
let deepest = -1; let deepest = -1;
for (const a of [0, Math.PI / 2, Math.PI, -Math.PI / 2]) { for (const a of [0, Math.PI / 2, Math.PI, -Math.PI / 2]) {
const h = castRay(v, tx, ty, a); const h = castRay(v, tx, ty, a);