From c539f2916451de2f624f5356e4430e39b98007d7 Mon Sep 17 00:00:00 2001 From: Thierry Berger Date: Fri, 26 Jul 2024 10:54:52 +0200 Subject: [PATCH] update to rapier 0.22 (#568) --- CHANGELOG.md | 5 +++++ bevy_rapier2d/Cargo.toml | 2 +- bevy_rapier3d/Cargo.toml | 2 +- bevy_rapier_benches3d/Cargo.toml | 6 +++--- src/geometry/shape_views/triangle.rs | 2 ++ 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 368514c5..e472493a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## Unreleased +### Modified + +- Update from rapier `0.21` to rapier `0.22`, + see [rapier's changelog](https://github.com/dimforge/rapier/blob/master/CHANGELOG.md). + ### Fix - Fix a crash when using `TimestepMode::Interpolated` and removing colliders diff --git a/bevy_rapier2d/Cargo.toml b/bevy_rapier2d/Cargo.toml index d6749f7b..77f5b841 100644 --- a/bevy_rapier2d/Cargo.toml +++ b/bevy_rapier2d/Cargo.toml @@ -46,7 +46,7 @@ async-collider = ["bevy/bevy_asset", "bevy/bevy_scene"] [dependencies] bevy = { version = "0.14", default-features = false } nalgebra = { version = "0.33", features = ["convert-glam027"] } -rapier2d = "0.21" +rapier2d = "0.22" bitflags = "2.4" log = "0.4" serde = { version = "1", features = ["derive"], optional = true } diff --git a/bevy_rapier3d/Cargo.toml b/bevy_rapier3d/Cargo.toml index 11b0a43a..ccce9042 100644 --- a/bevy_rapier3d/Cargo.toml +++ b/bevy_rapier3d/Cargo.toml @@ -47,7 +47,7 @@ async-collider = ["bevy/bevy_asset", "bevy/bevy_scene"] [dependencies] bevy = { version = "0.14", default-features = false } nalgebra = { version = "0.33", features = ["convert-glam027"] } -rapier3d = "0.21" +rapier3d = "0.22" bitflags = "2.4" log = "0.4" serde = { version = "1", features = ["derive"], optional = true } diff --git a/bevy_rapier_benches3d/Cargo.toml b/bevy_rapier_benches3d/Cargo.toml index 2bb0caba..a7529bfb 100644 --- a/bevy_rapier_benches3d/Cargo.toml +++ b/bevy_rapier_benches3d/Cargo.toml @@ -9,6 +9,6 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -rapier3d = { features = ["profiler"], version = "0.21" } -bevy_rapier3d = { version = "0.27.0-rc.1", path = "../bevy_rapier3d" } -bevy = { version = "0.14.0-rc.3", default-features = false } +rapier3d = { features = ["profiler"], version = "0.22" } +bevy_rapier3d = { version = "0.27", path = "../bevy_rapier3d" } +bevy = { version = "0.14", default-features = false } diff --git a/src/geometry/shape_views/triangle.rs b/src/geometry/shape_views/triangle.rs index d676689b..8891cfcc 100644 --- a/src/geometry/shape_views/triangle.rs +++ b/src/geometry/shape_views/triangle.rs @@ -37,6 +37,7 @@ macro_rules! impl_ref_methods( /// /// The normal points such that it is collinear to `AB × AC` (where `×` denotes the cross /// product). + #[cfg(feature = "dim3")] #[inline] pub fn normal(&self) -> Option { self.raw.normal().map(|n| (*n).into()) @@ -46,6 +47,7 @@ macro_rules! impl_ref_methods( /// /// The vector points such that it is collinear to `AB × AC` (where `×` denotes the cross /// product). + #[cfg(feature = "dim3")] #[inline] pub fn scaled_normal(&self) -> Vect { self.raw.scaled_normal().into()