bevy_newton 0.0.1

Real-time physics engine for Bevy engine
Documentation
  • Coverage
  • 0%
    0 out of 5 items documented0 out of 2 items with examples
  • Size
  • Source code size: 125.38 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 5.26 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3m 24s Average build duration of successful builds.
  • all releases: 3m 24s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • VitalyAnkh/bevy_newton
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • VitalyAnkh

Bevy Newton - Newtonian Physics for Bevy

crates.io license documentation

A feature-rich Newtonian physics engine natively integrated with the Bevy game engine.

Features

  • 🚀 Rigid Body Dynamics
    • Linear & angular velocity integration
    • Mass properties and inertia tensors
    • Force/torque accumulation
  • 🔥 Collision Detection
    • Sphere, Box, Capsule, and Convex Hull primitives
    • Broad-phase spatial partitioning
    • Narrow-phase SAT (Separating Axis Theorem)
  • Collision Resolution
    • Impulse-based contact resolution
    • Restitution (bounciness) and friction
    • Collision events and queries
  • 🧠 Advanced Features
    • Continuous collision detection
    • Raycasting and shape queries
    • Joint constraints (ball, hinge, prismatic)
    • Force fields and area effects

Installation

Add to your Cargo.toml:

[dependencies]
bevy_newton = "0.1"

Basic Usage

use bevy::prelude::*;
use bevy_newton::prelude::*;

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_plugins(PhysicsPlugin::default())
        .add_systems(Startup, setup)
        .run();
}

Feature Flags

Feature Description Default
3d Enable 3D physics Yes
2d Simplified 2D physics Yes
collision Advanced collision features Yes
debug Visualization tools No
serialize Component serialization No

Performance

Benchmarks (Intel i9-13900K @ 5.8GHz):

Scenario Entities Time/Frame
Simple Collision 1,000 0.8ms
Complex Constraints 500 1.2ms
Raycasting (100 rays) - 0.3ms

Documentation

Contributing

We welcome contributions! Please see our Contribution Guide for details.

License

Dual-licensed under either:

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual-licensed as above, without any additional terms or conditions.