Video wird geladen...
Video konnte nicht geladen werden
I built a physically based Three.js drifting simulator. Let me explain 👇 #threejs #gamedev
32 Kommentare

Making a basic drift behaviour is pretty easy, I explained it several time but here goes the generic -> move the car based on a forward direction inputs rotates the car, the forward direction lerps to the actual car's forward direction, bingo you get an easy drift behaviour !

But i want actual car feel, weight, weight balance shift, car tires, slip drift, etc. And for that we have several option : 1. Rapier, issue : rapier struggles with fast moving objects so you easily miss grips. 2. PhysX Nvidia, issue : poor resources online and unmaintained

But physics engine has one BIG issue with three.js : They act as a black box, it's a bit complicated to understand the slippiness, and what's exactly happening. Only one solution :

So I spent my entire insomnight reading docs, watching videos, understanding how cars works, suspension, acceleration. And I built my own car engine: Here's with a grippy setup. just tweaking values provided the drift simulator

only raycast bvh based

@threejs looks good! yeah rapier isn't great for three.js vehicle physics, a custom solution is much better. Thats where I ended up too.

@threejs I tried building it myself here, it was decent. see: demo here:

@threejs never once have i seen basement studio fail at something

@threejs Wow, that was fast from the moment you mentioned the project. Machine mode 🔥

@threejs Woww

@threejs hawt

@threejs It's insane how fast you're progressing with your projects, really cool 👏👏

@threejs From idea to shipping 👁️👁️

@threejs 🐐🐐🐐🐐🐐🐐🐐🐐🐐🐐🐐🐐🐐

@threejs just with three.js? damn it looks amazing!! reminds me of Drift City lol legend 👏🏼

@threejs t'es un malade et j'avais vu passer une approche avec une sphère à la place de la voiture pour simuler la physique drift. ça aurait été moins intéressant ?

c’est exactement ça, et c’est beaucoup moins intéressant parce que t’as le contrôle. Le principe même du drift pour avoir expérimenté ça un milliers d’heures en simu, c’est de pas avoir le contrôle et de jouer avec ça T’es en contrôle que quand tu maîtrise l’incontrôlable 😂

@threejs Haha tkt gros amateur de drift et tout en VR

@threejs Voilaaaa

@threejs Wow ! Looks good. Btw i saw a plugin for driving game physics, i used the equivalent for my ciws game its jsbsim

@threejs Damn, any live example ?

@threejs This is so smooth and clean! Well done

@threejs Thanks Seb ! I try too !

@threejs epic

@threejs This looks so good

@threejs This looks amazing

@threejs Wow so cool! though I do appreciate the craft that goes into getting the drifts right, Inertial Drift has the most dope looking drift animations I can think of

@threejs Now enable DLSS5, ans you got a triple A game

@threejs NICE!

@threejs I think the missing piece here is good drift sound effects - wonder how you can integrate that into the engine?

@threejs Where can I play this?

@threejs 👀👀👀
