Walk and fly through the city

Adds walk and fly cameras alongside the helicopter view, switched with
1/2/3 or the city toolbar. Walking uses mouse-look with pointer lock
(or drag), WASD, Shift to run and circle-vs-footprint collision with
sub-stepping so long frames cannot tunnel through buildings; flying
follows the view pitch with Space/C for altitude and clears low roofs.
Double-clicking a street drops you there with an animated descent,
facing the longest open street. A crosshair names the building ahead
(E or click inspects it), the address bar shows the folder you are in,
and a minimap shows your heading and teleports on click.
This commit is contained in:
Andy Dixon
2026-05-23 14:33:00 +01:00
parent 3036763d08
commit 76c846fdce
6 changed files with 310 additions and 9 deletions
+12
View File
@@ -81,6 +81,18 @@
<span><b>Scroll</b> dolly</span>
<span><b>F</b> reset</span>
</div>
<div class="city-hud" id="cityHud" hidden>
<div class="city-views" role="group" aria-label="City camera">
<button type="button" data-city-view="heli" title="Helicopter (1)"><kbd>1</kbd> Helicopter</button>
<button type="button" data-city-view="walk" title="Walk (2)"><kbd>2</kbd> Walk</button>
<button type="button" data-city-view="fly" title="Fly (3)"><kbd>3</kbd> Fly</button>
</div>
<span class="city-help" id="cityHelp"></span>
</div>
<div class="crosshair" id="crosshair" hidden></div>
<div class="city-target" id="cityTarget" hidden></div>
<div class="city-address" id="cityAddress" hidden></div>
<canvas class="minimap" id="minimap" width="220" height="150" hidden title="Click to travel"></canvas>
<nav class="breadcrumb" id="breadcrumb" aria-label="Selected file path">
<button id="homeButton" aria-label="Fit entire codebase">←</button>
<span id="breadcrumbText">No codebase loaded</span>