Track the change of effective dominance of a rigid-body.

This commit is contained in:
Sébastien Crozet
2021-10-24 16:40:16 +02:00
committed by Sébastien Crozet
parent 601955b4ee
commit b45d4b5ac2
4 changed files with 36 additions and 6 deletions

View File

@@ -331,7 +331,10 @@ impl RigidBody {
/// The dominance group of this rigid-body.
pub fn set_dominance_group(&mut self, dominance: i8) {
self.rb_dominance.0 = dominance
if self.rb_dominance.0 != dominance {
self.changes.insert(RigidBodyChanges::DOMINANCE);
self.rb_dominance.0 = dominance
}
}
/// Adds a collider to this rigid-body.