Wheeled vehicle simulation using Bevy engine with Rapier's joints

Overview

⚠️ Legacy branch! ⚠️

'master' branch is currently broken due to migration to newer rapier and bevy_rapier so unless you want to compare old and new versions this branch offers a better experience

cargo_run

Hello! This is a prototype of vehicle simulator based on Rapier and Bevy written on Rust. Inspired by Godot-6DOF-Vehicle-Demo.

Parameters

wheel_size

From Parameters window these can be adjusted:

  • Size of front and rear wheels
  • Every individual wheel's density and sizes
  • Vehicle's body density and sizes

Motivation

It started as a learning project to check out the underlying tech. State of Rapier v0.12.0-alpha.0 is surprizingly robust, the goal was to get a somewhat working vehicle without any tweaks from game code over the results of simulation using just rigid bodies, joints and motors (just like in 6DOF-Vehicle-Demo).
Unlike Bullet (physics engine used in said demo), Rapier doesnt support 6 degrees of freedom joints yet, but with two chained revolute joints: one for wheel rotation(x-axis) and one for steering(y-axis), a stable and functional wheel was made! Making four of those and attaching them to a box scaled by z-axis made a nice wagon. Using motors for accelerating and steering was also quite intuitive, though I must admit that it took me some time to figure out all the axis and how to orient them in both frames of a joint.

Controls

W / S: gas / reverse
A / D: steer left / steer right
Mouse look: camera orbiting around vehicle
Esc: Toggle Show/Hide mouse cursor
Ctrl + Space: Toggle flying camera (wasd + space + shift)
Ctrl + Esc: Close app
You might also like...
A crate for using Bevy with the Godot Engine.

bevy_godot A crate for using Bevy with the Godot Engine. This crate is in active development and is not ready for production use. Features Godot Scene

A Client/Server game networking plugin using QUIC, for the Bevy game engine.
A Client/Server game networking plugin using QUIC, for the Bevy game engine.

Bevy Quinnet A Client/Server game networking plugin using QUIC, for the Bevy game engine. Bevy Quinnet QUIC as a game networking protocol Features Roa

🌎 Demo for Minecraft-like procedural generation using the Bevy game engine
🌎 Demo for Minecraft-like procedural generation using the Bevy game engine

infinigen This is a demo for Minecraft-like procedural generation using the Bevy game engine. chunks along all axes (X, Y and Z) adjustable zoom level

Life simulation written in rust

Life simulation written in Rust, inspired by this very old screensaver: https://sourceforge.net/projects/primlife/ Demo: https://joelthelion.github.io

Abstreet - Transportation planning and traffic simulation software for creating cities friendlier to walking, biking, and public transit
Abstreet - Transportation planning and traffic simulation software for creating cities friendlier to walking, biking, and public transit

A/B Street Ever been stuck in traffic on a bus, wondering why is there legal street parking instead of a dedicated bus lane? A/B Street is a project t

3d car simulation in rust
3d car simulation in rust

3d car simulation in rust This project is developed with intention to learn: programming on rust, computer graphics, physics simulation, geometric alg

A gravitation simulation with Barnes-Hut algorithm implementation.
A gravitation simulation with Barnes-Hut algorithm implementation.

Gravitation Particles A Barnes-Hut implementation of n-body gravitation simulation in Rust. Running the project The video rendering feature is impleme

Using bevy and custom render pipelines in order to render many objects in a forest using chunks for performance.

bevy_efficient_forest_example Using bevy and custom render pipelines in order to render many objects in a forest using chunks for performance. Grass i

bevy-hikari is an implementation of voxel cone tracing global illumination with anisotropic mip-mapping in Bevy
bevy-hikari is an implementation of voxel cone tracing global illumination with anisotropic mip-mapping in Bevy

Bevy Voxel Cone Tracing bevy-hikari is an implementation of voxel cone tracing global illumination with anisotropic mip-mapping in Bevy. Bevy Version

Owner
null
A sci-fi battle simulation implemented in the bevy engine.

Bevy Combat It's a bevy port of my ECS Combat Unity demo. Check out the web demo in your browser. You can use the - and = keys to speed up and slow do

ElliotB256 47 Dec 22, 2022
Minecraft-esque voxel engine prototype made with the bevy game engine. Pending bevy 0.6 release to undergo a full rewrite.

vx_bevy A voxel engine prototype made using the Bevy game engine. Goals and features Very basic worldgen Animated chunk loading (ala cube world) Optim

Lucas Arriesse 125 Dec 31, 2022
A velocity-based falling sand simulation built with Rust and Bevy

⏳ Bevy Falling Sand A velocity-based falling sand simulation built with Rust and Bevy! This simluation uses bevy_rapier to generate colliders that reg

Tomato 7 Oct 30, 2023
Bevy Simple Portals is a Bevy game engine plugin aimed to create portals.

Portals for Bevy Bevy Simple Portals is a Bevy game engine plugin aimed to create portals. Those portals are (for now) purely visual and can be used t

Sélène Amanita 11 May 28, 2023
A networked (p2p), cross-platform physics simulation example using rollback netcode

bevy_gaff (work in progress) bevy_gaff is an attempt at making a networked (p2p), cross-platform physics simulation using rollback netcode. It synchro

Johan Klokkhammer Helsing 13 Sep 5, 2023
Minecraft using Bevy and Bevy-Meshem

minecraft_bevy Minecraft_bevy was built to showcase bevy_meshem. After a week of developing it has: Chunk loading / unloading each chunk's mesh is bei

Adam 7 Oct 4, 2023
Proof-of-concept of getting OpenXR rendering support for Bevy game engine using gfx-rs abstractions

Introduction Proof-of-concept of getting OpenXR rendering support for Bevy game engine using gfx-rs abstractions. (hand interaction with boxes missing

Mika 52 Nov 14, 2022
A game of snake written in Rust using the Bevy game engine, targeting WebGL2

Snake using the Bevy Game Engine Prerequisites cargo install cargo-make Build and serve WASM version Set your local ip address in Makefile.toml (loca

Michael Dorst 0 Dec 26, 2021
Simple island generator written in rust using bevy engine

Getting Started Easy enough to run cargo run --release Change generation speed Find the system set that looks like this .add_system_set(

Kris 3 Apr 21, 2022
Brine is my attempt at writing a Minecraft client in Rust using the Bevy game engine.

Brine Brine is my attempt at writing a Minecraft client in Rust using the Bevy game engine. It's EXTREMELY work-in-progress. The thing that makes Brin

Ben Reeves 34 Dec 26, 2022