← all documents · raw markdown · 5 KB

GOAL (for Claude Code CLI): KAIVERSE 3rd-person camera + controls fix (browser kaiverse.js)

> Codex v9.10.64 · Tier 1.5 · Codex §Comprehensive Plans

> AI / low-credit: One control fix per session; render-only 3rd-person; on stop log Last worked / Next.

Status: OPEN. Owner-reported while flying. Browser kaiverse.js only (Tier 1.5 player ship + controls). Surgical, reversible, flag-gated; do NOT alter nsUpdateCamera first-person movement math — the 3rd-person view is an additive, render-only layer (see CLAUDE-CODE-HANDOFF.md SCOPE box). Hard-refresh to apply.

Workflow: the owner is the tester (he flies + reports), the architect writes these specs, you (CLI) implement. Eyeball-iterate: ship one small change, owner flies + reports, tune. Don't guess the feel — that's his call.

---

1. Controller B button = BACK / CANCEL (not "return to core")

B is hardwired to "return to core" — wrong. Make it context-dependent back/cancel:

2. Throttle — make it DYNAMIC + analog + controller-driven (it feels "unreal")

The owner says the throttle speed is "way too unreal." Two fixes:

(a) Analog throttle from the controller. The throttle should be a smooth 0→1 driven by an analog control — right trigger (RT) as the primary throttle (light press = slow cruise, full press = full speed), and/or left-stick magnitude as it already half-does. Map it into NS.throttleT continuously, not in coarse D-pad steps. Keyboard/no-pad behavior stays as-is.

(b) Kill the "unreal" feel. Right now top speed / acceleration reads teleporty. Make world-speed dynamic and believable:

3. 3rd-person camera — fix the GTA "reverse-cam" flip (the main issue)

Bug (owner's words): "when I move it makes me view forward, but then the camera view shows in front of where I'm going — like GTA when it looks at you moving toward the camera, then back to 3rd person, then back. It's not great." → The camera is oscillating between behind the ship and in front of it.

Cause: the chase camera is anchoring/recentering on the velocity vector (or flipping the offset sign), so when velocity and look-direction disagree, the camera swings to the front and snaps back. Classic velocity-based-recenter glitch.

Fix — anchor the camera to the LOOK/HEADING direction, never to velocity:

Guardrails (verify after):

Acceptance (owner look-test)

1. B backs out of menus, never teleports to core.

2. Throttle responds analog to the trigger; open-space cruise feels fast-but-real, the approach to a surface slows to a believable crawl — no teleporty jumps.

3. In 3rd-person the camera stays smoothly behind the ship at all times — no flip to the front, no GTA reverse-cam, no snapping. Turning swings the camera around smoothly.

4. First-person (toggle off) is identical to before. Picking + proximity effects still correct.