3D Vehicle Physics Game!
3D Car Physics Demo
Yet another physics demo..
I wanted to try writing a working 3D physics-based game, and this is as far as I got.
Currently working on a server physics engine (less lag!), stay tuned for that :D
- 3D physics!
- Vehicle with realistic suspension
- Terrain with basic obstacles and interactive objects
Although this is a relatively simple game, I spent countless hours trying to fix Physijs, as this library is over 5 years old and no longer works correctly with THREE, unfortunately :(
There is also no documentation on the vehicle physics itself, so I used Physijs' vehicle example.
You can use the vehicle generator I wrote for this game. If you measure by lines of code, this is relatively short, but helps a lot in the end.
Sometimes you can get one of your wheels stuck inside the ground, since there is no physics body on the wheels (it appears to be a particle, so it can get stuck inside the thin terrain).
Press V to flip your vehicle.
The way that forces are applied to the wheels makes it that you will constantly accelerate, regardless if you are pressing W or not. There is no real way to maintain speed, unless I write a cruise control-style system (can only apply engine force). For some reason, setting engine force to 0 forces the car to brake instead of slowly losing speed. Eventually, I'll find a solution to this.
W, A, S, D moves the car, or arrow keys
Click and drag to look around.
Got stuck? Press V to flip.
If you want to go really fast, hold Q.
Try the following:
- Don't use a school computer
- Disable your adblocker
- Use Chrome
EDIT: Plz! Stop upvoting this! Has more updoots than SortaCraft now
Because he's a god at coding.
Let's pay respects to the people who play this game without a mouse (touchpad users I understand your suffering)
O, you’ve used a more than one h1, for this project it’s not important, but in a future you can’t actually use more than one h1 on a page 😉
i found a glitch where you keep pressing v you fly into the sky you cant move around tho
It really good but the car flips too easily and also you can't make it up the big ramp no matter how hard you try. But Its really good. Keep up the great work. I'm looking forward to your next one.