Verlet physics plugin for bevy.

Overview

bevy_verlet

workflow

MIT licensed unsafe forbidden Crates.io Docs.rs dependency status

Simple Verlet points and sticks implementation for bevy.

Features

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.

Cargo features

  1. debug

This feature will add a system drawing debug lines for every stick using bevy_prototype_debug_lines

Examples

2D

  1. 2D Line

    cargo run --example 2d_line --features "debug"

    Alt

  2. 2D cloth

    cargo run --example 2d_cloth --features "debug"

    Alt

  3. 2D cloth cutting

    cargo run --example 2d_cloth_cutter --features "debug" --release

    Note: the release flag is necessary for smooth running

    Alt

3D

  • cargo run --example 3d_line --features "debug"
  • cargo run --example 3d_cloth --features "debug"

Credits

Inspired by:

You might also like...
Little 2D physics engine used for my game Crate Before Attack.
Little 2D physics engine used for my game Crate Before Attack.

Circle2D Circle2D is a little physics library used for my game CrateBeforeAttack. Live demo: https://koalefant.github.io/circle2d/ It is not productio

Reimplementation of Matthias Müller's "Ten Minute Physics" demos in Rust with WASM + WebGL

ten-minute-physics-rs reimplements Matthias Müller's "Ten Minute Physics" demos in Rust with WASM + WebGL. Compared with the source pure Javascript im

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

A Bevy plugin for loading the LDtk 2D tile map format.
A Bevy plugin for loading the LDtk 2D tile map format.

bevy_ldtk ( Tileset from "Cavernas" by Adam Saltsman ) A Bevy plugin for loading LDtk tile maps. Usage use bevy::prelude::*; use bevy_ldtk::*; fn mai

Inspector plugin for the bevy game engine
Inspector plugin for the bevy game engine

bevy-inspector-egui This crate provides the ability to annotate structs with a #[derive(Inspectable)], which opens a debug interface using egui where

A plugin for Egui integration into Bevy
A plugin for Egui integration into Bevy

bevy_egui This crate provides a Egui integration for the Bevy game engine. Features: Desktop and web (bevy_webgl2) platforms support Clipboard (web su

Crossterm plugin for the bevy game engine
Crossterm plugin for the bevy game engine

What is bevy_crossterm? bevy_crossterm is a Bevy plugin that uses crossterm as a renderer. It provides custom components and events which allow users

A Bevy plugin to use Kira for game audio

Bevy Kira audio This bevy plugin is intended to try integrating Kira into Bevy. The end goal would be to replace or update bevy_audio, if Kira turns o

A prototype plugin providing a simple line drawing api for bevy.
A prototype plugin providing a simple line drawing api for bevy.

bevy_debug_lines A prototype plugin providing a simple line drawing api for bevy. See docs.rs for documentation. Expect breakage on master. Click on t

Comments
  • Parallel queries and fixes

    Parallel queries and fixes

    • [x] Time step management fixed
    • [x] Parallel queries
    • [x] Cargo.toml improvement
    • [x] Working examples
    • [x] Removing shuffle feature
    • [x] by default 2 computations are enabled
    opened by ManevilleF 0
Releases(0.1.0)
  • 0.1.0(Oct 15, 2021)

    First version of the crate, now available on crates.io.

    Features

    • Verlet Point physics
    • Constraining Verlet Sticks
    • Verlet sticks tension
    • Customizable physics time step
    • Configuration options:
      • Custom gravity
      • Custom iterations count
      • Custom parallel batching
      • Custom friction
    Source code(tar.gz)
    Source code(zip)
Owner
Félix Lescaudey de Maneville
French
Félix Lescaudey de Maneville
A simple Verlet integration solver written using the Rust SDL2 bindings.

Rust Verlet Solver A simple Verlet integration solver written using the Rust SDL2 bindings. Where's the friction?! Building cargo-vcpkg is required in

Will 8 Jun 6, 2022
A simple Verlet integration solver written using the Rust SDL2 bindings.

Rust Verlet Solver A simple Verlet integration solver written using the Rust SDL2 bindings. Where's the friction?! Building cargo-vcpkg is required in

Will 8 Jun 6, 2022
An ergonomic physics API for bevy games.

Heron An ergonomic physics API for 2d and 3d bevy games. (powered by rapier) How it looks like fn main() { App::build() .add_plugins(DefaultPlug

Jonathan Cornaz 313 Dec 16, 2022
Game physics in one weekend with bevy

Game Physics in a Weekend (in Rust) This project is an implementation of the Game Physics in a Weekend book using the Rust programming language and th

Cameron Hart 28 Dec 23, 2022
A physics lib for the bevy game engine based on physme

physimple Physimple aims to be the simplest(and capable) physics engine(currently for bevy) WARNING Beware for breaking changes with each update for n

null 24 Oct 28, 2022
2D and 3D physics engine based on Extended Position Based Dynamics for Bevy.

Bevy XPBD Bevy XPBD is a 2D and 3D physics engine based on Extended Position Based Dynamics (XPBD) for the Bevy game engine. Design Below are some of

Joona Aalto 203 Jul 6, 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
Atomic Physics Library

Iridium Atomic Physics Library Attempt at making a atomic database. Uses Nubase2020, ENSDF for decay chains, atomic masses, and half-lives. Nubase2020

J.A Sory 14 Jun 19, 2022
2 and 3-dimensional rigid body physics engine for Rust.

Users guide | 2D Documentation | 3D Documentation | Forum ⚠️ **This crate is now passively-maintained. It is being superseded by the Rapier project.**

dimforge 1.6k Jan 6, 2023
Sandbox is a pixel physics simulator inspired by other such like Sandspiel and Noita

Sandbox Sandbox is a pixel physics simulator inspired by other such like Sandspiel and Noita. It's also a precursor for an ongoing game project. Sandb

Okko Hakola 76 Nov 3, 2022