Properly wake-up rigid-bodies that must be awaken because of joints

This commit is contained in:
Sébastien Crozet
2022-06-24 15:11:37 +02:00
parent 8546434f35
commit d6b6189861

View File

@@ -371,6 +371,16 @@ impl PhysicsPipeline {
hooks: &dyn PhysicsHooks,
events: &dyn EventHandler,
) {
// Apply some of delayed wake-ups.
for handle in impulse_joints
.to_wake_up
.drain(..)
.chain(multibody_joints.to_wake_up.drain(..))
{
islands.wake_up(bodies, handle, true);
}
// Apply modifications.
let modified_bodies = bodies.take_modified();
let mut modified_colliders = colliders.take_modified();
let mut removed_colliders = colliders.take_removed();