# Program your Tesla to race

**URL:** <https://discourse.threejs.org/t/program-your-tesla-to-race/57841>\
**Category:** Showcase\
**Tags:** simulation, physics, raycastvehicle, cannonjs\
**Created:** [November 6, 2023, 2:57pm UTC](https://discourse.threejs.org/t/program-your-tesla-to-race/57841 "2023-11-06T14:57:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kelvinko](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/kelvinko/32/41665_2.png) [@kelvinko](https://discourse.threejs.org/u/kelvinko)\
**Post date:** [November 6, 2023, 2:57pm UTC](https://discourse.threejs.org/t/program-your-tesla-to-race/57841/1 "2023-11-06T14:57:50Z")

</div>

I am working on an open source project which aim at letting people interest in autonomous driving technology to try it with a low entry barrier. The end goal would like to allow users to program their car to have autonomous racing with each other like a programming challenge.

The visualisation is done with three.js together with cannon.js for physics simulation.

 ![sim-only](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/f/1/f19d3296c139cfa81679639e00cd164de8766240.png)

It is still an on going project, if you are interested in the development progress, you can also checkout this blog post series:

> **[Playground for Autonomous Driving — Part 0](https://medium.com/@kelvinkoko/playground-for-autonomous-driving-part-0-c93431c2b19b)**
>
> Beginning of the journey

Project page:

> **[GitHub - kelvinkoko/autonomous-driving-playground: Playground for programing...](https://github.com/kelvinkoko/autonomous-driving-playground)**
>
> Playground for programing your self driving car 🚙. Contribute to kelvinkoko/autonomous-driving-playground development by creating an account on GitHub.

Current demo:  
[https://playkuruma.web.app/](https://playkuruma.web.app/)

---

<div class="post-metadata">

**Author:** ![PavelBoytchev](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/pavelboytchev/32/38639_2.png) [@PavelBoytchev](https://discourse.threejs.org/u/PavelBoytchev)\
**Post date:** [November 11, 2023, 11:09am UTC](https://discourse.threejs.org/t/program-your-tesla-to-race/57841/2 "2023-11-11T11:09:43Z")

</div>

It looks promising.

In manual mode, when I use the keys to change the direction, releasing the keys resets the direction immediately. Should resetting happen gradually as in real cars?

---

<div class="post-metadata">

**Author:** ![kelvinko](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/kelvinko/32/41665_2.png) [@kelvinko](https://discourse.threejs.org/u/kelvinko)\
**Post date:** [November 12, 2023, 12:22pm UTC](https://discourse.threejs.org/t/program-your-tesla-to-race/57841/3 "2023-11-12T12:22:14Z")

</div>

Thanks for the comment, that’s a good catch! Let me try to fix this to make it more realistic.
