mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
clear velocity on removed colliders also
This commit is contained in:
parent
aa3dfc7d52
commit
cc20fc919b
@ -716,6 +716,12 @@ remove_handler(CollisionTraverser::Handlers::iterator hi) {
|
|||||||
|
|
||||||
nassertr(_ordered_colliders.size() == _colliders.size(), false);
|
nassertr(_ordered_colliders.size() == _colliders.size(), false);
|
||||||
|
|
||||||
|
if (auto_clear_velocity) {
|
||||||
|
// Clear the velocity on the removed node, to be consistent
|
||||||
|
// with nodes that were not removed.
|
||||||
|
node->clear_velocity();
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// This collider references some other handler; keep it.
|
// This collider references some other handler; keep it.
|
||||||
++ci;
|
++ci;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user