diff --git a/src/plugin/plugin.rs b/src/plugin/plugin.rs index ef6c8465..73282b8d 100644 --- a/src/plugin/plugin.rs +++ b/src/plugin/plugin.rs @@ -107,8 +107,7 @@ where systems::update_colliding_entities, systems::writeback_rigid_bodies, systems::writeback_mass_properties, - Events::::update_system - .after(systems::writeback_mass_properties), + Events::::update_system.after(systems::writeback_mass_properties), ) .into_configs(), } diff --git a/src/plugin/systems.rs b/src/plugin/systems.rs index 100617fe..51367669 100644 --- a/src/plugin/systems.rs +++ b/src/plugin/systems.rs @@ -16,7 +16,7 @@ use crate::plugin::configuration::{SimulationToRenderTime, TimestepMode}; use crate::plugin::{RapierConfiguration, RapierContext}; use crate::prelude::{ BevyPhysicsHooks, BevyPhysicsHooksAdapter, CollidingEntities, KinematicCharacterController, - KinematicCharacterControllerOutput, RigidBodyDisabled, Vect, MassModified, + KinematicCharacterControllerOutput, MassModified, RigidBodyDisabled, Vect, }; use crate::utils; use bevy::ecs::system::{StaticSystemParam, SystemParamItem}; @@ -689,7 +689,7 @@ pub fn writeback_mass_properties( if config.physics_pipeline_active { for entity in mass_modified.iter() { - if let Some(handle) = context.entity2body.get(&entity).copied() { + if let Some(handle) = context.entity2body.get(entity).copied() { if let Some(rb) = context.bodies.get(handle) { if let Ok(mut mass_props) = mass_props.get_mut(**entity) { let new_mass_props =