Friday, June 16, 2023

Experimenting with car physics in Bevy

 I was curious about how a racing game, say, would implement the physics of a car (accelerating, braking) in a ECS setting. I found this page https://asawicki.info/Mirror/Car%20Physics%20for%20Games/Car%20Physics%20for%20Games.html that described some equations with actual values for an existing car, so it was perfect! I coded the equations as a Bevy system and used some Bevy UI to be able to show the speed, RPM, etc. 

So here's a very exciting car racing game, where you can accelerate and brake and see the speed go up and down! https://github.com/JPMoresmau/carphys for the curious!

No comments: