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
@@ -143,3 +143,16 @@ export function deepestFacing(view: GameView, x: number, y: number): number {
|
||||
}
|
||||
return face;
|
||||
}
|
||||
|
||||
/** Where a cutaway camera may STAND back from a square: rays thread warp
|
||||
* mouths but a body cannot, so a warped ray's ground ends at the mouth.
|
||||
* Returns the richest heading and how far back real floor allows. */
|
||||
export function cutawayStand(view: GameView, x: number, y: number): { facing: number; depth: number } {
|
||||
let deepest = -1, facing = 0;
|
||||
for (const a of [0, Math.PI / 2, Math.PI, -Math.PI / 2]) {
|
||||
const h = castRay(view, x, y, a);
|
||||
const d = h.warped && h.warpDist !== undefined ? Math.min(h.dist, h.warpDist) : h.dist;
|
||||
if (d > deepest) { deepest = d; facing = a; }
|
||||
}
|
||||
return { facing, depth: deepest };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user