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
@@ -12,7 +12,7 @@
|
||||
import { objectArt, tokenArt } from "./art";
|
||||
import { fpFxForEvents, type FpFx } from "./fpv/fx3d";
|
||||
import { castRay, SIDE_ANGLE, OPPOSITE } from "./fpv/raycast";
|
||||
import { deepestFacing } from "./fpv/director";
|
||||
import { cutawayStand, deepestFacing } from "./fpv/director";
|
||||
import { aimOfEvents, gatherGlides, hurledIn, shortestArc } from "./fpv/director";
|
||||
import { onDestroy, untrack } from "svelte";
|
||||
import type { GameEvent, GameView, Side } from "@wizwar/engine";
|
||||
@@ -331,8 +331,7 @@
|
||||
const willCut = !camReady || (dist > 1.6 && !hurled);
|
||||
cutawayShot = false;
|
||||
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