diff --git a/Cargo.toml b/Cargo.toml index 0c1c71ea..88b25a0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,3 +6,4 @@ parry2d = { path = "build/parry2d" } parry3d = { path = "build/parry3d" } parry2d-f64 = { path = "build/parry2d-f64" } parry3d-f64 = { path = "build/parry3d-f64" } +bevy = {path = "../bevy"} \ No newline at end of file diff --git a/build/parry2d-f64/Cargo.toml b/build/parry2d-f64/Cargo.toml index 909fdced..4cbc3750 100644 --- a/build/parry2d-f64/Cargo.toml +++ b/build/parry2d-f64/Cargo.toml @@ -27,6 +27,7 @@ enhanced-determinism = [ "simba/libm_force", "indexmap" ] # Do not enable this feature directly. It is automatically # enabled with the "simd-stable" or "simd-nightly" feature. simd-is-enabled = [ ] +bevy-components = ["bevy"] [lib] name = "parry2d_f64" @@ -48,6 +49,7 @@ serde = { version = "1.0", optional = true, features = ["derive"]} num-derive = "0.3" indexmap = { version = "1", features = [ "serde-1" ], optional = true } rustc-hash = "1" +bevy = { version = "0.5", default-features = false, optional = true } [dev-dependencies] simba = { version = "0.6", features = [ "partial_fixed_point_support" ] } diff --git a/build/parry2d/Cargo.toml b/build/parry2d/Cargo.toml index 6a1ec45a..e98a5437 100644 --- a/build/parry2d/Cargo.toml +++ b/build/parry2d/Cargo.toml @@ -27,6 +27,7 @@ enhanced-determinism = [ "simba/libm_force", "indexmap" ] # Do not enable this feature directly. It is automatically # enabled with the "simd-stable" or "simd-nightly" feature. simd-is-enabled = [ ] +bevy-components = ["bevy"] [lib] name = "parry2d" @@ -48,6 +49,7 @@ serde = { version = "1.0", optional = true, features = ["derive"]} num-derive = "0.3" indexmap = { version = "1", features = [ "serde-1" ], optional = true } rustc-hash = "1" +bevy = { version = "0.5", default-features = false, optional = true } [dev-dependencies] simba = { version = "0.6", features = [ "partial_fixed_point_support" ] } diff --git a/build/parry3d-f64/Cargo.toml b/build/parry3d-f64/Cargo.toml index a1453d00..2c69220e 100644 --- a/build/parry3d-f64/Cargo.toml +++ b/build/parry3d-f64/Cargo.toml @@ -27,6 +27,7 @@ enhanced-determinism = [ "simba/libm_force", "indexmap" ] # Do not enable this feature directly. It is automatically # enabled with the "simd-stable" or "simd-nightly" feature. simd-is-enabled = [ ] +bevy-components = ["bevy"] [lib] name = "parry3d_f64" @@ -47,7 +48,7 @@ serde = { version = "1.0", optional = true, features = ["derive", "rc"]} num-derive = "0.3" indexmap = { version = "1", features = [ "serde-1" ], optional = true } rustc-hash = "1" - +bevy = { version = "0.5", default-features = false, optional = true } [dev-dependencies] oorandom = "11" diff --git a/build/parry3d/Cargo.toml b/build/parry3d/Cargo.toml index e212833d..8be3da1b 100644 --- a/build/parry3d/Cargo.toml +++ b/build/parry3d/Cargo.toml @@ -27,6 +27,7 @@ enhanced-determinism = [ "simba/libm_force", "indexmap" ] # Do not enable this feature directly. It is automatically # enabled with the "simd-stable" or "simd-nightly" feature. simd-is-enabled = [ ] +bevy-components = ["bevy"] [lib] name = "parry3d" @@ -47,7 +48,7 @@ serde = { version = "1.0", optional = true, features = ["derive", "rc"]} num-derive = "0.3" indexmap = { version = "1", features = [ "serde-1" ], optional = true } rustc-hash = "1" - +bevy = { version = "0.5", default-features = false, optional = true } [dev-dependencies] oorandom = "11" diff --git a/src/shape/shared_shape.rs b/src/shape/shared_shape.rs index fcb37b41..1f3f862c 100644 --- a/src/shape/shared_shape.rs +++ b/src/shape/shared_shape.rs @@ -16,6 +16,7 @@ use std::sync::Arc; /// The shape of a collider. #[derive(Clone)] +#[cfg_attr(feature = "bevy-components", derive(bevy::prelude::Component))] pub struct SharedShape(pub Arc); impl Deref for SharedShape {