Skip to content

feat: 3D cockpit challenge camera + landing-point reticle (v0.6.14.0)#60

Open
kenlacroix wants to merge 3 commits into
mainfrom
feat/cockpit-camera
Open

feat: 3D cockpit challenge camera + landing-point reticle (v0.6.14.0)#60
kenlacroix wants to merge 3 commits into
mainfrom
feat/cockpit-camera

Conversation

@kenlacroix

Copy link
Copy Markdown
Owner

Summary

A first-person cockpit view for 3D mode — the 4th angle in the C cycle (chase → orbital → low → cockpit). Deliberately a challenge camera, not the default: from inside the lander you can't see your own attitude, and 3D foreshortening already makes precision landing harder. So it ships with the thing that makes it landable.

The skill aid: Landing-Point Designator

A world-space ground reticle showing where you'll touch down if you cut thrust now — ballistic projection from current position + velocity under gravity, refined against the terrain height at the predicted spot. The ring is green over a pad, amber off it. Fly by steering the marker onto the pad. (Apollo had the same idea — the LPD grid in the LM window.)

Details

  • Cockpit camera — at the lander, rolls with the craft (banking is felt), looks down-forward into the terrain depth; LM mesh hides. A camera-fixed boresight gives a stable aim reference while the world tilts around it for attitude feedback.
  • IGameplayRenderer.setEffectiveGravity?(g) — optional; Game feeds gravityPreset.gameGravity so the LPD predicts correctly on alt-gravity worlds (Europa/Titan/sandbox). Canvas/WebGL omit it.
  • Live flight defaults to chase; the land/crash beat still pulls to the orbital shot.

Verification

  • tsc + biome clean (new/edited files) · vite build succeeds · 602/602 tests pass.
  • ⚠️ Camera/reticle need a live WebGL context (not jsdom-testable). Confirm on the preview with ?renderer=3d → press C to reach cockpit; check the LPD tracks and recolors over pads.

Follow-up polish (deferred, in TODOS)

Window-frame vignette and a synthetic attitude indicator (roll currently reads from the world tilting).

🤖 Generated with Claude Code

Adds a first-person cockpit view as the 4th C-cycle camera in the 3D
renderer. Since you can't see your own attitude from inside (and 3D
foreshortening already makes precision landing hard), it ships with a
ballistic landing-point designator: a ground reticle showing where you'll
touch down if thrust is cut, green over a pad and amber off it. LM hidden,
camera rolls with the craft. New optional IGameplayRenderer.setEffectiveGravity
feeds per-world gravity so the prediction is correct on alt-gravity worlds.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 15, 2026

Copy link
Copy Markdown

Deploying moonlander-enhanced with  Cloudflare Pages  Cloudflare Pages

Latest commit: 56daa31
Status: ✅  Deploy successful!
Preview URL: https://986e7558.moonlander-enhanced.pages.dev
Branch Preview URL: https://feat-cockpit-camera.moonlander-enhanced.pages.dev

View logs

kenlacroix and others added 2 commits June 15, 2026 15:37
Polish on the v0.6.14.0 cockpit camera. A camera-fixed porthole vignette
frames the first-person view, and a synthetic attitude indicator at
bottom-center shows roll directly: a horizon bar counter-rotates against a
fixed craft reference that reddens past the 10-degree landing-angle gate.
Both are cockpit-only and need a live WebGL context (not jsdom-testable);
verified in-browser on ?renderer=3d.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kenlacroix

Copy link
Copy Markdown
Owner Author

Follow-up: v0.6.15.0 — cockpit polish

Added the two follow-ups flagged in the v0.6.14.0 CHANGELOG note, addressing the "you can't see your own attitude from inside" tension:

  • Window-frame vignette — camera-fixed porthole darkening the periphery, so the view reads as inside the lander.
  • Synthetic attitude indicator — artificial-horizon gauge at bottom-center; the horizon bar counter-rotates with the craft roll and the reference reddens once bank exceeds the 10° landing gate.

Verified in-browser on ?renderer=3d (press C ×3 to cockpit): gauge is level/green at 0°, tilts and turns red when banked past 10°. Typecheck, build, and 602 tests pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant