Skip to content

Adding drive mode with physics simulator for street view option#204

Open
jeremybrachle wants to merge 1 commit into
StrandedKitty:devfrom
jeremybrachle:strata
Open

Adding drive mode with physics simulator for street view option#204
jeremybrachle wants to merge 1 commit into
StrandedKitty:devfrom
jeremybrachle:strata

Conversation

@jeremybrachle

@jeremybrachle jeremybrachle commented Jun 21, 2026

Copy link
Copy Markdown

Hi @StrandedKitty ! I'm just opening this PR to gauge interest in a new feature and get feedback on direction in case you'd like to pull in this open-source contribution. I'll be changing direction soon for my long term project's vision but I wanted to split this part out as an additive feature that you could bring into your project if you find value to it. Just let me know if you have any questions! This is my first open-source project I've forked so all feedback is welcome 😅


Background

These code changes provide a new opt-in "drive mode" that lets you explore any location currently in the Streets GL map at street level by driving a car instead of only orbiting from above. Press the G key to drop into a car at the current location and drive around with WASD; press again to return to the normal camera. It reuses the existing terrain-height API and follows the existing ControlsNavigator pattern, so it's additive — the default experience is unchanged unless you opt in.

Current feature set:

  • A DriveControlsNavigator (new NavigationMode.Drive) with analog WASD input and
    a low chase camera.
  • Arcade-style driving with spring-damper suspension that hugs the terrain (the car
    body leans/bounces over slopes).
  • A Car renderable + small GBuffer material/shaders; a procedural car plus optional
    glTF car models.
  • A small speedometer/compass HUD shown only in drive mode.

Notes:

  • this draft branch is my full experimentation fork, so the diff is large/noisy (I can clean this up in a new PR later)
  • the demo currently uses a CC-BY Bugatti model

What I'd actually propose upstream:

If you're interested in this feature in your branch, I'll create a focused feature/drive-mode branch off dev with just the minimal, license-clean core, gated so the default UX is untouched:

Questions

  1. Is an opt-in street-level drive mode something you'd want in Streets GL at all?
  2. If so, how would you prefer it gated/exposed (a config flag? a UI toggle?)?
  3. Any preference on where a CarSystem / vehicle render path should live?
  4. Any constraints on bundling a small default car model ? For example the CC0 option might be easiest but it won't be as realistic looking so you please go ahead and create your own model if you'd like, I won't be offended since I'm not a visual artist lol

How to run:

git clone -b strata https://github.com/jeremybrachle/streets-gl.git
cd streets-gl
npm i
npm run dev

# open in: http://localhost:8080/

# then press `G` to render a procedural car and then `B` to change to the Bugatti. `G` to go back to arial view
# WASD to move, click to drag the camera or press `C` for mouse control, `V` to reset camera
# Shift to boost, Space to break
# 

Screenshots (tested in San Francisco!)

image image image

@jeremybrachle

jeremybrachle commented Jun 21, 2026

Copy link
Copy Markdown
Author

@jeremybrachle jeremybrachle marked this pull request as ready for review June 21, 2026 17:59
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