Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Aceeri committed Jul 29, 2023
1 parent 08ede5b commit b8e7ad3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/plugin/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ where
systems::update_colliding_entities,
systems::writeback_rigid_bodies,
systems::writeback_mass_properties,
Events::<MassModified>::update_system
.after(systems::writeback_mass_properties),
Events::<MassModified>::update_system.after(systems::writeback_mass_properties),
)
.into_configs(),
}
Expand Down
4 changes: 2 additions & 2 deletions src/plugin/systems.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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 =
Expand Down

0 comments on commit b8e7ad3

Please sign in to comment.