diff --git a/CHANGELOG.md b/CHANGELOG.md index a34c189..9dbeb99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 0.8.0 +- Update to Bevy 0.12 + ## 0.7.0 - Added support for using XPBD & wrapped Parry3d components for Nav-Mesh generation (Courtesy of @Elabajaba) - Add benchmarks. diff --git a/Cargo.toml b/Cargo.toml index 722426b..c9389e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "oxidized_navigation" description = "A Nav-Mesh generation plugin for Bevy Engine." -version = "0.7.0" +version = "0.8.0" edition = "2021" authors = ["TheGrimsey"] @@ -48,19 +48,19 @@ required-features = ["xpbd"] name = "parry3d" [dependencies] -bevy = { version = "0.11", default-features = false } +bevy = { version = "0.12", default-features = false, features = ["multi-threaded"] } # parry3d doesn't expose the convert-glam feature, so we need to add nalgebra to enable the feature nalgebra = { version = "0.32", features = ["convert-glam024"] } parry3d = "0.13" -bevy_rapier3d = { version = "0.22", optional = true } -bevy_xpbd_3d = { version = "0.2", optional = true } +bevy_rapier3d = { version = "0.23", optional = true, default-features = false, features = ["dim3"] } +bevy_xpbd_3d = { version = "0.3", optional = true, default-features = false, features = ["3d", "f32"] } smallvec = { version = "1.11", features = ["union"] } [dev-dependencies] -bevy = { version = "0.11", default-features = false, features = [ +bevy = { version = "0.12", default-features = false, features = [ "bevy_asset", "bevy_pbr", "bevy_render", diff --git a/README.md b/README.md index 7897525..73d2f94 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ Debug draw is available behind the ``debug_draw`` feature and using the ``Oxidiz | Crate Version | Bevy Version | Bevy Rapier 3D Version | Bevy Xpbd 3D Version | Parry3d Version | | ------------- | ------------ | ---------------------- | -------------------- | --------------- | +| unreleased | 0.12 | 0.23 | 0.3 | 0.13 | | 0.7.0 | 0.11 | 0.22 | 0.2 | 0.13 | | 0.6.0 | 0.11 | 0.22 | unsupported | unsupported | | 0.5.X | 0.10.X | 0.21 | unsupported | unsupported | @@ -72,4 +73,3 @@ In this case you may be able to [override which version Oxidized Navigation depe - [ ] Nav-mesh "layers" using different ``NavMeshSettings``. - [ ] Pathfinding ticket system (Call to pathfinding returns a ticket that one can check later, controlling async pathfinding like this allows us to limit the amount of parallel tasks & prioritize them) - [ ] Remove ``create_nav_mesh_tile_from_poly_mesh`` in favor of creating data in the right format from the start. - diff --git a/examples/xpbd.rs b/examples/xpbd.rs index b95bb22..a23ef81 100644 --- a/examples/xpbd.rs +++ b/examples/xpbd.rs @@ -82,7 +82,7 @@ fn setup( transform: Transform::IDENTITY, ..default() }, - Collider::cuboid(50.0, 0.2, 50.0), + Collider::cuboid(25.0, 0.1, 25.0), NavMeshAffector, // Only entities with a NavMeshAffector component will contribute to the nav-mesh. )); @@ -94,7 +94,7 @@ fn setup( transform: Transform::from_xyz(-5.0, 0.8, -5.0), ..default() }, - Collider::cuboid(2.5, 2.5, 2.5), + Collider::cuboid(1.25, 1.25, 1.25), NavMeshAffector, // Only entities with a NavMeshAffector component will contribute to the nav-mesh. )); @@ -106,8 +106,7 @@ fn setup( transform: Transform::from_xyz(-3.0, 0.8, 5.0).with_scale(Vec3::new(50.0, 15.0, 1.0)), ..default() }, - // At the time of writing, xpbd (v0.2) colliders don't support scaling, so you have to create the collider with the post-scaled size. - Collider::cuboid(5.0, 1.5, 0.1), + Collider::cuboid(0.05, 0.05, 0.05), NavMeshAffector, // Only entities with a NavMeshAffector component will contribute to the nav-mesh. )); } diff --git a/src/colliders/xpbd.rs b/src/colliders/xpbd.rs index 270091d..f5592dc 100644 --- a/src/colliders/xpbd.rs +++ b/src/colliders/xpbd.rs @@ -5,10 +5,10 @@ use super::OxidizedCollider; /// This is only compiled and available when the "xpbd" feature is enabled. impl OxidizedCollider for bevy_xpbd_3d::prelude::Collider { fn oxidized_into_typed_shape(&self) -> TypedShape { - self.as_typed_shape() + self.shape_scaled().as_typed_shape() } fn oxidized_compute_local_aabb(&self) -> Aabb { - self.compute_local_aabb() + self.shape_scaled().compute_local_aabb() } } diff --git a/src/contour.rs b/src/contour.rs index 0fbe3e1..ee2d118 100644 --- a/src/contour.rs +++ b/src/contour.rs @@ -1,6 +1,6 @@ use std::cmp::Ordering; -use bevy::prelude::{warn, IVec2, UVec2, UVec4}; +use bevy::{prelude::{IVec2, UVec2, UVec4}, log::warn}; use crate::{ get_neighbour_index, diff --git a/src/lib.rs b/src/lib.rs index cfcd170..c353636 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -427,7 +427,7 @@ fn handle_removed_affectors_system( mut dirty_tiles: ResMut, ) { for relations in removed_affectors - .iter() + .read() .filter_map(|removed| affector_relations.0.remove(&removed)) { for tile in relations { diff --git a/src/mesher.rs b/src/mesher.rs index 9cb6efa..ed4e1d4 100644 --- a/src/mesher.rs +++ b/src/mesher.rs @@ -1,4 +1,4 @@ -use bevy::prelude::{info, UVec2, UVec3, UVec4}; +use bevy::{prelude::{UVec2, UVec3, UVec4}, log::info}; use crate::{contour::ContourSet, Area}; diff --git a/tests/rapier3d.rs b/tests/rapier3d.rs index ec4d0c9..a535542 100644 --- a/tests/rapier3d.rs +++ b/tests/rapier3d.rs @@ -1,6 +1,6 @@ use std::time::Duration; -use bevy::{prelude::*, scene::ScenePlugin}; +use bevy::prelude::*; use bevy_rapier3d::prelude::{Collider, NoUserData, RapierPhysicsPlugin}; use oxidized_navigation::{ query::find_path, ActiveGenerationTasks, NavMesh, NavMeshAffector, NavMeshSettings, @@ -82,11 +82,7 @@ fn setup_app(app: &mut App) { max_tile_generation_tasks: Some(9), // Github Actions are limited to 7 GB. }), RapierPhysicsPlugin::::default(), - // Required by Rapier - AssetPlugin::default(), - ScenePlugin, )); - app.add_asset::(); // Required by Rapier. }