Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: simulation in task over multiple frames #29

Open
wants to merge 18 commits into
base: interpolation_exploration
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 27 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,37 @@

## Unreleased

## v0.28.0 (09 December 2024)

### Modified

- `RapierContext` has been split in multiple `Component`s:
- `RapierContextColliders`
- `RapierContextJoints`
- `RapierContextSimulation`
- `RapierRigidBodySet`
- Renamed `DefaultReadRapierContext` and `DefaultWriteRapierContext`.
- Use `ReadRapierContext` and its associated `single()` method.

## v0.28.0 (09 December 2024)

### Modified

- Update from rapier `0.21` to rapier `0.22`,
see [rapier's changelog](https://github.com/dimforge/rapier/blob/master/CHANGELOG.md).
- Update bevy to 0.15.
- `RapierContext`, `RapierConfiguration` and `SimulationToRenderTime` are now a `Component` instead of resources.
- Rapier now supports multiple independent physics worlds, see example `multi_world3` for usage details.
- Migration guide:
- `ResMut<mut RapierContext>` -> `WriteDefaultRapierContext`
- `Res<RapierContext>` -> `ReadDefaultRapierContext`
- Access to `RapierConfiguration` and `SimulationToRenderTime` should query for it
on the responsible entity owning the `RenderContext`.
- If you are building a library on top of `bevy_rapier` and would want to support multiple independent physics worlds too,
you can check out the details of [#545](https://github.com/dimforge/bevy_rapier/pull/545)
to get more context and information.
- `colliders_with_aabb_intersecting_aabb` now takes `bevy::math::bounding::Aabb3d` (or `[..]::Aabb2d` in 2D) as parameter.
- it is now accessible with `headless` feature enabled.

### Fix

Expand All @@ -21,21 +48,6 @@ which was its hardcoded behaviour.
`RapierDebugColliderPlugin` and `DebugRenderContext`, as well as individual collider setup via
a `ColliderDebug` component.

### Modified

- `RapierContext`, `RapierConfiguration` and `RenderToSimulationTime` are now a `Component` instead of resources.
- Rapier now supports multiple independent physics worlds, see example `multi_world3` for usage details.
- Migration guide:
- `ResMut<mut RapierContext>` -> `WriteDefaultRapierContext`
- `Res<RapierContext>` -> `ReadDefaultRapierContext`
- Access to `RapierConfiguration` and `RenderToSimulationTime` should query for it
on the responsible entity owning the `RenderContext`.
- If you are building a library on top of `bevy_rapier` and would want to support multiple independent physics worlds too,
you can check out the details of [#545](https://github.com/dimforge/bevy_rapier/pull/545)
to get more context and information.
- `colliders_with_aabb_intersecting_aabb` now takes `bevy::math::bounding::Aabb3d` (or `[..]::Aabb2d` in 2D) as parameter.
- it is now accessible with `headless` feature enabled.

## v0.27.0 (07 July 2024)

**This is an update from rapier 0.19 to Rapier 0.21 which includes several stability improvements
Expand Down
13 changes: 5 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@
members = ["bevy_rapier2d", "bevy_rapier3d", "bevy_rapier_benches3d"]
resolver = "2"

[workspace.lints]
rust.unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(feature, values("dim2", "dim3"))',
] }

[profile.dev]
# Use slightly better optimization by default, as examples otherwise seem laggy.
opt-level = 1
# opt-level = 1

[profile.release]
codegen-units = 1

[profile.tracing]
inherits = "release"
debug = 1

[patch.crates-io]
#nalgebra = { path = "../nalgebra" }
#parry2d = { path = "../parry/crates/parry2d" }
Expand All @@ -25,5 +24,3 @@ codegen-units = 1
#parry3d = { git = "https://github.com/dimforge/parry", branch = "master" }
#rapier2d = { git = "https://github.com/dimforge/rapier", branch = "character-controller" }
#rapier3d = { git = "https://github.com/dimforge/rapier", branch = "character-controller" }
bevy_egui = { git = "https://github.com/Vrixyz/bevy_egui", branch = "bevy_main" }
bevy-inspector-egui = { git = "https://github.com/Vrixyz/bevy-inspector-egui", branch = "bevy_0.15" }
31 changes: 24 additions & 7 deletions bevy_rapier2d/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_rapier2d"
version = "0.27.0"
version = "0.28.0"
authors = ["Sébastien Crozet <[email protected]>"]
description = "2-dimensional physics engine in Rust, official Bevy plugin."
documentation = "http://docs.rs/bevy_rapier2d"
Expand All @@ -18,7 +18,10 @@ path = "../src/lib.rs"
required-features = ["dim2"]

[lints]
workspace = true
rust.unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(feature, values("dim3"))',
] }
clippy = { needless_lifetimes = "allow" }

[features]
default = ["dim2", "async-collider", "debug-render-2d"]
Expand Down Expand Up @@ -47,30 +50,44 @@ serde-serialize = ["rapier2d/serde-serialize", "bevy/serialize", "serde"]
enhanced-determinism = ["rapier2d/enhanced-determinism"]
headless = []
async-collider = ["bevy/bevy_asset", "bevy/bevy_scene"]
background_simulation = ["bevy/multi_threaded"]

[dependencies]
bevy = { version = "0.15.0-rc.2", default-features = false }
bevy = { version = "0.15", default-features = false }
nalgebra = { version = "0.33", features = ["convert-glam029"] }
#rapier2d = { git = "http://github.com/dimforge/rapier", branch = "master" }
rapier2d = "0.22"
profiling = "1.0"

bitflags = "2.4"
log = "0.4"
serde = { version = "1", features = ["derive"], optional = true }
crossbeam-channel = "0.5"
async-std = "1.13"

[dev-dependencies]
bevy = { version = "0.15.0-rc.2", default-features = false, features = [
bevy = { version = "0.15", default-features = false, features = [
"x11",
"bevy_state",
"bevy_window",
"bevy_debug_stepping",
"bevy_text",
"bevy_ui",
"bevy_asset",
"default_font",
] }
oorandom = "11"
approx = "0.5.1"
glam = { version = "0.29", features = ["approx"] }
bevy-inspector-egui = "0.28.0"
bevy_egui = "0.30.0"
# bevy_mod_debugdump = "0.11"
bevy_mod_debugdump = { git = "https://github.com/andriyDev/bevy_mod_debugdump.git", branch = "bevy-0.15" }
bevy_egui = "0.31"
bevy_mod_debugdump = "0.12"
bevy_transform_interpolation = { git = "https://github.com/Jondolf/bevy_transform_interpolation.git" }

[package.metadata.docs.rs]
# Enable all the features when building the docs on docs.rs
features = ["debug-render-2d", "serde-serialize"]

[[example]]
name = "background2"
# required-features = ["background_simulation", "bevy/multi_threaded"]
Loading
Loading