Skip to content

Commit

Permalink
Move rigid_body->set_transform inside the MESH_PHYSICS_RIGID_BODY_AND…
Browse files Browse the repository at this point in the history
…_MESH case above rigid_body->set_name to make it more consistent with the other switch cases
  • Loading branch information
SaracenOne committed Jul 8, 2021
1 parent 78c3ffc commit 2d8751d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion editor/import/resource_importer_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,11 +629,11 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<
} break;
case MESH_PHYSICS_RIGID_BODY_AND_MESH: {
RigidBody3D *rigid_body = memnew(RigidBody3D);
rigid_body->set_transform(mi->get_transform());
rigid_body->set_name(p_node->get_name());
p_node->replace_by(rigid_body);
p_node->queue_delete();
p_node = rigid_body;
rigid_body->set_transform(mi->get_transform());
mi->set_transform(Transform3D());
rigid_body->add_child(mi);
mi->set_owner(rigid_body->get_owner());
Expand Down

0 comments on commit 2d8751d

Please sign in to comment.