The cockpit's camera ignores your own casts entirely

A cast through the glass is aimed by the eyes that fired it — you
face it by definition — and a keymap cast is a deliberate off-screen
act. Neither moves the camera. Aims and cutaways serve only deeds
done by others.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015RCWSTnb1KYTPyL4GmhGnF
This commit is contained in:
Eric Wagoner
2026-08-27 16:10:27 -04:00
co-authored by Claude Fable 5
parent 72f5df5bba
commit f53f26ace9
+5 -14
View File
@@ -346,27 +346,18 @@
// plays only for things done TO you, never for your own hands — // plays only for things done TO you, never for your own hands —
// dropping a dagger must not fling your eyes out of your skull. // dropping a dagger must not fling your eyes out of your skull.
return takeCutaway(m.position.x + 0.5, m.position.y + 0.5); return takeCutaway(m.position.x + 0.5, m.position.y + 0.5);
} else if (aim && !aim.self) { } else if (aim && !aim.self && actor !== povId) {
// In the cockpit your own casts never move the camera: casting
// through the glass means you are ALREADY facing the target, and
// a keymap cast is a deliberate off-screen act. Only deeds done
// BY OTHERS earn an aim or a cutaway.
const ax = aim.x + 0.5, ay = aim.y + 0.5; const ax = aim.x + 0.5, ay = aim.y + 0.5;
const wantFacing = Math.atan2(ay - ty, ax - tx); const wantFacing = Math.atan2(ay - ty, ax - tx);
const arc = Math.abs(shortestArc(camF, wantFacing));
if (actor === povId) {
// Your own magic turns your head — but never wrenches it and
// NEVER cuts away: casting a door onto the wall you face must
// not fling the eyes to some other vantage. A gentle turn when
// the deed is off to the side; nothing when it is behind you
// or already in frame.
if (arc <= Math.PI * 0.55) {
targetFacing = wantFacing;
aimed = true;
}
} else {
const toAim = Math.hypot(ax - tx, ay - ty); const toAim = Math.hypot(ax - tx, ay - ty);
const sight = castRay(v, tx, ty, wantFacing); const sight = castRay(v, tx, ty, wantFacing);
if (sight.warped || sight.dist < toAim - 0.4) return takeCutaway(ax, ay); if (sight.warped || sight.dist < toAim - 0.4) return takeCutaway(ax, ay);
targetFacing = wantFacing; targetFacing = wantFacing;
aimed = true; aimed = true;
}
} else if (performance.now() >= manualUntil) { } else if (performance.now() >= manualUntil) {
// Another wizard acting in your sight line turns your head. // Another wizard acting in your sight line turns your head.
const other = actor !== povId ? v.players.find((p) => p.id === actor && p.alive) : null; const other = actor !== povId ? v.players.find((p) => p.id === actor && p.alive) : null;