aboutsummaryrefslogtreecommitdiff
path: root/src/pipeline/user_changes.rs
diff options
context:
space:
mode:
authorThierry Berger <contact@thierryberger.com>2024-06-03 15:20:24 +0200
committerThierry Berger <contact@thierryberger.com>2024-06-03 15:20:24 +0200
commite1ed90603e618e28f48916690d761e0d8213e2ad (patch)
tree8399da9825ca9ee8edd601b1265e818fa303b541 /src/pipeline/user_changes.rs
parentfe336b9b98d5825544ad3a153a84cb59dc9171c6 (diff)
parent856675032e76b6eb4bc9e0be4dc87abdbcfe0421 (diff)
downloadrapier-e1ed90603e618e28f48916690d761e0d8213e2ad.tar.gz
rapier-e1ed90603e618e28f48916690d761e0d8213e2ad.tar.bz2
rapier-e1ed90603e618e28f48916690d761e0d8213e2ad.zip
Merge branch 'master' into collider-builder-debug
Diffstat (limited to 'src/pipeline/user_changes.rs')
-rw-r--r--src/pipeline/user_changes.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pipeline/user_changes.rs b/src/pipeline/user_changes.rs
index 7c3f1ac..a2b00a1 100644
--- a/src/pipeline/user_changes.rs
+++ b/src/pipeline/user_changes.rs
@@ -120,9 +120,9 @@ pub(crate) fn handle_user_changes_to_rigid_bodies(
islands.active_kinematic_set.push(*handle);
}
- // Push the body to the active set if it is not
- // sleeping and if it is not already inside of the active set.
- if changes.contains(RigidBodyChanges::SLEEP)
+ // Push the body to the active set if it is not inside the active set yet, and
+ // is either not longer sleeping or became dynamic.
+ if (changes.contains(RigidBodyChanges::SLEEP) || changes.contains(RigidBodyChanges::TYPE))
&& rb.is_enabled()
&& !rb.activation.sleeping // May happen if the body was put to sleep manually.
&& rb.is_dynamic() // Only dynamic bodies are in the active dynamic set.