Crates.io | bevy_verlet |
lib.rs | bevy_verlet |
version | 0.9.0 |
source | src |
created_at | 2021-10-15 11:49:24.693241 |
updated_at | 2024-07-12 07:33:48.845826 |
description | Verlet physics implementation in bevy |
homepage | |
repository | https://github.com/ManevilleF/bevy_verlet |
max_upload_size | |
id | 465441 |
size | 122,703 |
Simple Verlet points and sticks implementation for bevy.
If you are looking for cloth physics, please check
bevy_silk
instead
bevy_verlet |
bevy |
---|---|
0.1.x | 0.5.x |
0.2.x | 0.6.x |
0.3.x | 0.7.x |
0.4.x | 0.8.x |
0.5.x | 0.9.x |
0.6.x | 0.11.x |
0.7.x | 0.12.x |
0.8.x | 0.13.x |
0.9.x | 0.14.x |
You can simply add a VerletPoint
component on any entity with a
Transform
and the verlet physics will apply.
Connect points using VerletStick
to constrain movement (see
examples).
Lock some points by adding the VerletLocked
component on a VerletPoint
entity.
Customize friction and gravity with the VerletConfig
resource.
Works in 2D and 3D.
debug
This feature will add a system drawing debug lines for every stick using bevy gizmos
2D Line
cargo run --example 2d_line --features "debug"
2D cloth
cargo run --example 2d_cloth --features "debug"
2D cloth cutting
`cargo run --example 2d_cloth_cutter --features "debug"
cargo run --example 3d_line --features "debug"
cargo run --example 3d_cloth --features "debug"
Inspired by: