Fixed bug that caused collision not to be properly reenabled when joint between two bodies is destroyed
(cherry picked from commit 519e314bea
)
This commit is contained in:
parent
2aafe2b25e
commit
127f3c0566
1 changed files with 3 additions and 1 deletions
|
@ -62,8 +62,10 @@ void Joint::_body_exit_tree(const ObjectID &p_body_id) {
|
|||
void Joint::_update_joint(bool p_only_free) {
|
||||
|
||||
if (joint.is_valid()) {
|
||||
if (ba.is_valid() && bb.is_valid())
|
||||
if (ba.is_valid() && bb.is_valid()) {
|
||||
PhysicsServer::get_singleton()->body_remove_collision_exception(ba, bb);
|
||||
PhysicsServer::get_singleton()->body_remove_collision_exception(bb, ba);
|
||||
}
|
||||
|
||||
PhysicsServer::get_singleton()->free(joint);
|
||||
joint = RID();
|
||||
|
|
Loading…
Add table
Reference in a new issue