Accelerator Controlled BMW i8 ↶📱↷

Using devicemotion event to control Car

This car reacts to the orientation of your smartphone. ↶📱↷

Demo Live:

On Smartphone:

  • Left & Right Phone tilt for steering the Car ↶📱↷
  • Vertical Phone tilt accelerate/deaccelerate the Car :arrow_upper_left::selfie::arrow_lower_right:

On PC controls are usual:

  • Use W, S, A, D to Drive the Car


  • Body, hood, glass and Wheel’s rim material are fully customizable PBR Material.:red_car:

  • Click/Tap: Throw Metal Balls(try Breaking window Glass):soccer:

  • Switch On/Off Car’s Lights :bulb:

Other features Somehow Inspired by God’s Trance Playlist:

  • Black & White Pass
  • Emit dust Particle When Drives

EXCELLENT!!! pinging @PirateJC

1 Like

Wow great! Does the accelerometer work on any phone or tablet devices? I’m curious to know how you got that to work in the browser? Thanks!

Yes Accelerometer works on any phone or tablet.If you open this demo in your smartphone then you can steer this car by tilting your phone.

If you rotate your phone horizontally then it will steer car and if you rotate your phone vertically then car will accelerate and decelerate.

I have tried many times on my 2 iPhones and multiple browsers, but unfortunately I couldn’t get any of the accelerometer to work in the browser. Please advise!

Does this demo work on iPhone? i have not tried on apple devices. You can try this link for texting of sensors Demo - The Web's Sixth Sense: A Study of Scripts Accessing Smartphone Sensors

I like it, very nice was this a hobby project or something required by a client?

1 Like

This was the hobby project. I had seen this car demos long time back so I always wanted to make one myself:

When Elon Musk announced Cybertruck I decided to make a Cybertruck with BabylonJS. First I made a simple scene with Cybertruck that you can drive. Then I added some obstacles, traffic cones, glass breaking effect and jump tracks. It was a great learning.

Cybertruck Demo:

After that I applied my learning to make this BMW project. I would say BMWi8 is the next iteration of the Cybertruck experiment.

BMWi Demo: