icurtis1/raycast-vehicle — explained in plain English
Analysis updated 2026-05-18
Study a working example of raycast vehicle physics for a browser game.
Play the live demo in a browser using keyboard, touch, or a gamepad.
Tune vehicle feel, like suspension stiffness and jump height, using the live tuning panel.
Learn how to convert a 3D level model into exact physics colliders instead of hand-built collision boxes.
| icurtis1/raycast-vehicle | db9cd2fgbj-hash/codex-deepseek-bridge | deanwhitex/aiw2.0stack | |
|---|---|---|---|
| Stars | 28 | 28 | 28 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 2/5 | 3/5 | 3/5 |
| Audience | developer | developer | vibe coder |
Figures from each repo's GitHub metadata at analysis time.
Raycast RC Car is an arcade-style browser game demo built with three.js for graphics and cannon-es for physics. It shows off a raycast vehicle technique: each wheel is simulated as a downward-pointing ray acting like a spring and damper, rather than a separate physical wheel object, which the README says is what makes the approach fast and stable. The physics ideas are credited to Bruno Simon's portfolio site and the open-source Sketchbook project. The car itself is a single box-shaped rigid body with four small spheres tucked into its corners, needed because the physics engine's mesh colliders only generate contact against spheres and flat planes, not boxes. The driving level is a single 3D model file used for both what you see and what you collide with, since every mesh in it becomes an exact collision shape, so ramps, loops, and curved walls work without anyone hand building separate collision boxes. A chase camera smoothly follows the car, widening its field of view and pulling back during a boost, and a post-processing pass adds color grading, vignette, chromatic aberration, film grain, and a wind-streak effect while boosting. You can drive with a keyboard using WASD or arrow keys, an on-screen joystick on touch devices, or a browser Gamepad API controller, with shift or a trigger for boost and space or a face button to jump or handbrake. A live tuning panel, hidden on touch devices, exposes vehicle, camera, world, effects, and model settings so you can adjust engine force, steering sharpness, tire grip, suspension stiffness, and jump feel while the demo runs, with a button to reset everything to the shipped defaults. Running it locally requires Node.js 20 or newer, followed by npm install and npm run dev, and the README also documents a few specific cannon-es quirks the author ran into, like stale collision bounds after moving a static body.
A browser-playable RC car demo showing off raycast-based vehicle physics built with three.js and cannon-es.
Mainly JavaScript. The stack also includes JavaScript, three.js, cannon-es.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.