Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ManevilleF committed Jul 11, 2024
1 parent 1f96a0f commit 0904924
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/components/cloth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ impl Cloth {
}

#[cfg(test)]
#[allow(clippy::unwrap_used)]
mod tests {
use super::*;
use crate::mesh::rectangle_mesh;
Expand Down
2 changes: 1 addition & 1 deletion src/components/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ pub mod cloth_builder;
/// cloth rendering module
pub mod cloth_rendering;
/// collider module
#[cfg(any(feature = "rapier_collisions", feature = "xpbd_collisions"))]
#[cfg(any(feature = "rapier_collisions", feature = "avian_collisions"))]
pub mod collider;
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ use bevy::prelude::*;

/// Prelude module, providing every public type of the lib
pub mod prelude {
#[cfg(any(feature = "rapier_collisions", feature = "xpbd_collisions"))]
#[cfg(any(feature = "rapier_collisions", feature = "avian_collisions"))]
pub use crate::components::collider::ClothCollider;
pub use crate::{
components::{cloth_builder::ClothBuilder, cloth_rendering::NormalComputing},
Expand Down
6 changes: 3 additions & 3 deletions src/systems/collisions/avian.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn handle_collisions(
time: Res<Time>,
) {
let delta_time = time.delta_seconds();
for (entity, mut cloth, aabb, collider, mut xpbd_collider) in &mut cloth_query {
for (entity, mut cloth, aabb, collider, mut avian_collider) in &mut cloth_query {
for contact_pair in collisions.collisions_with_entity(entity) {
let other_entity = if contact_pair.entity1 == entity {
contact_pair.entity2
Expand All @@ -54,7 +54,7 @@ pub fn handle_collisions(
});
cloth.solve_collisions(|point| {
let other_transform = other_transform.compute_transform();
// TODO: Remove Nalgebra type conversions once bevy_xpbd has
// TODO: Remove Nalgebra type conversions once avian has
// a `Collider::project_point` method that uses Glam.
let projection = other_collider.shape_scaled().project_point(
&avian3d::parry::math::Isometry::new(
Expand Down Expand Up @@ -88,7 +88,7 @@ pub fn handle_collisions(
ang_vel.0 *= damp;
}
}
*xpbd_collider = get_collider(aabb, collider);
*avian_collider = get_collider(aabb, collider);
}
}

Expand Down

0 comments on commit 0904924

Please sign in to comment.