diff options
| author | Max Whitehead <max.blackllama.alt3@gmail.com> | 2024-03-10 23:44:26 -0700 |
|---|---|---|
| committer | Sébastien Crozet <sebastien@crozet.re> | 2024-03-23 10:50:02 +0100 |
| commit | 3fd18f4da8476a29945fa6f0c49e0af08d1f7363 (patch) | |
| tree | cf5529fbd7011d319286f8cd8e34a5fea951dfe3 /src/pipeline/user_changes.rs | |
| parent | f9663f894c022e25ae6c6bc572dc305fab1adb76 (diff) | |
| download | rapier-3fd18f4da8476a29945fa6f0c49e0af08d1f7363.tar.gz rapier-3fd18f4da8476a29945fa6f0c49e0af08d1f7363.tar.bz2 rapier-3fd18f4da8476a29945fa6f0c49e0af08d1f7363.zip | |
fix(user_changes): Fix RigidBodyType changed to Dynamic not updating
active dynamic set.
Diffstat (limited to 'src/pipeline/user_changes.rs')
| -rw-r--r-- | src/pipeline/user_changes.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pipeline/user_changes.rs b/src/pipeline/user_changes.rs index 7c3f1ac..9aa93a5 100644 --- a/src/pipeline/user_changes.rs +++ b/src/pipeline/user_changes.rs @@ -121,8 +121,8 @@ pub(crate) fn handle_user_changes_to_rigid_bodies( } // 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) + // sleeping and if it is not already inside of the active set, or if type changed to 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. |
