A plugin for simulating 2D soft bodies in Bevy
Still a work in progress, don't use it
Description
cargo run --example demo
Import the prelude in your main.rs
.
use bevy_squishy::prelude::*;
Add SquishyPlugin
to your app. This is included in the prelude.
.add_plugin(SquishyPlugin::default())
You can configure a number of options on SquishyPlugin
such as:
- Gravity: The gravity value to apply to all bodies, the default is
0.0, -9.8
, set this toNone
for no gravity.
Some explanation about how to create / spawn soft bodies
- This video does a great job at explaining an overview of how 2D soft bodies work Physics of JellyCar: Soft Body Physics Explained
- This video explains the math and physics behind how the soft bodies are simulated But How DO Soft Body Simulations Work?
Bevy | bevy_squishy |
---|---|
0.10 | main |
All code in this repository is dual-licensed under either:
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option. This means you can select the license you prefer! This dual-licensing approach is the de-facto standard in the Rust ecosystem and there are very good reasons to include both.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.