diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2017-08-16 02:00:01 +0200 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2017-08-16 02:00:03 +0200 |
commit | 22daecfbe9232fe5dfe3577670127f9749fd85ef (patch) | |
tree | 7c40513c82db02a5f5a7ae343a928e49ccb24266 /scene/3d | |
parent | a4f9c95169579d650d6189d5034fb417bcc518af (diff) |
Keep shapes bound to out-of-tree 3D physics objects
Now the shape in the physics server is unbound only when it's unparented from its body, because if it's unbound when just exiting the tree, a later readd would have the body shapeless in the server.
It's the same currently being done in 2D physics.
Fixes #10074.
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/collision_shape.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/scene/3d/collision_shape.cpp b/scene/3d/collision_shape.cpp index 4fd215bd1a..2aa6a95718 100644 --- a/scene/3d/collision_shape.cpp +++ b/scene/3d/collision_shape.cpp @@ -89,13 +89,6 @@ void CollisionShape::_notification(int p_what) { parent->shape_owner_set_transform(owner_id, get_transform()); } } break; - case NOTIFICATION_EXIT_TREE: { - if (parent) { - parent->remove_shape_owner(owner_id); - } - owner_id = 0; - parent = NULL; - } break; case NOTIFICATION_UNPARENTED: { if (parent) { parent->remove_shape_owner(owner_id); |