fix(user_changes): Fix RigidBodyType changed to Dynamic not updating
active dynamic set.
This commit is contained in:
committed by
Sébastien Crozet
parent
f9663f894c
commit
3fd18f4da8
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user