The cutaway camera may not walk through a warp mouth
A ray threads a warp and keeps counting; a body cannot. Both cutaway cameras (reel and live pane) backed down deepestFacing's corridor, which meant a mouth-adjacent shot could measure its backing room THROUGH the warp and park the eye off the board — a second of smeared nothing whenever someone stepped a rim warp. cutawayStand now measures standable ground, clamping warped rays at the mouth, so the shot stands on real floor watching the veil instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015RCWSTnb1KYTPyL4GmhGnF
This commit is contained in:
co-authored by
Claude Fable 5
parent
c8f719f467
commit
7c201554f5
@@ -7,7 +7,7 @@
|
||||
import { scheduleFx, type BoardFx } from "./fx";
|
||||
import { fpFxForEvents, type FpFx } from "./fpv/fx3d";
|
||||
import { castRay, edgeMid } from "./fpv/raycast";
|
||||
import { deepestFacing, aimOfEvents, gatherGlides, hurledIn, shortestArc } from "./fpv/director";
|
||||
import { cutawayStand, deepestFacing, aimOfEvents, gatherGlides, hurledIn, shortestArc } from "./fpv/director";
|
||||
import { prefs } from "./prefs.svelte";
|
||||
import { stackSightTrace } from "@wizwar/engine";
|
||||
import type { GameEvent, GameView } from "@wizwar/engine";
|
||||
@@ -249,8 +249,7 @@
|
||||
* corridor, facing it, holding a beat of the world-before so the
|
||||
* deed happens ON screen — with the reel's own wizard visible. */
|
||||
const takeCutaway = (ax: number, ay: number) => {
|
||||
const a = deepestFacing(v, ax, ay);
|
||||
const d = castRay(v, ax, ay, a).dist;
|
||||
const { facing: a, depth: d } = cutawayStand(v, ax, ay);
|
||||
const back = Math.min(1.6, Math.max(0.35, d - 0.4));
|
||||
cam.x = ax + Math.cos(a) * back;
|
||||
cam.y = ay + Math.sin(a) * back;
|
||||
|
||||
Reference in New Issue
Block a user