Merge pull request #54072 from KoBeWi/hrcr_is_ded
This commit is contained in:
commit
a2803f3d86
15 changed files with 42 additions and 50 deletions
|
|
@ -502,7 +502,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I
|
|||
sphereShape->set_radius(1);
|
||||
colshape->set_shape(sphereShape);
|
||||
}
|
||||
sb->add_child(colshape);
|
||||
sb->add_child(colshape, true);
|
||||
colshape->set_owner(sb->get_owner());
|
||||
}
|
||||
|
||||
|
|
@ -528,7 +528,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I
|
|||
rigid_body->set_transform(mi->get_transform());
|
||||
p_node = rigid_body;
|
||||
mi->set_transform(Transform3D());
|
||||
rigid_body->add_child(mi);
|
||||
rigid_body->add_child(mi, true);
|
||||
mi->set_owner(rigid_body->get_owner());
|
||||
|
||||
_add_shapes(rigid_body, shapes);
|
||||
|
|
@ -566,7 +566,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I
|
|||
|
||||
if (shapes.size()) {
|
||||
StaticBody3D *col = memnew(StaticBody3D);
|
||||
mi->add_child(col);
|
||||
mi->add_child(col, true);
|
||||
col->set_owner(mi->get_owner());
|
||||
|
||||
_add_shapes(col, shapes);
|
||||
|
|
@ -614,7 +614,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I
|
|||
|
||||
if (shapes.size()) {
|
||||
StaticBody3D *col = memnew(StaticBody3D);
|
||||
p_node->add_child(col);
|
||||
p_node->add_child(col, true);
|
||||
col->set_owner(p_node->get_owner());
|
||||
|
||||
_add_shapes(col, shapes);
|
||||
|
|
@ -749,7 +749,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<
|
|||
switch (mesh_physics_mode) {
|
||||
case MESH_PHYSICS_MESH_AND_STATIC_COLLIDER: {
|
||||
StaticBody3D *col = memnew(StaticBody3D);
|
||||
p_node->add_child(col);
|
||||
p_node->add_child(col, true);
|
||||
col->set_owner(p_node->get_owner());
|
||||
col->set_transform(get_collision_shapes_transform(node_settings));
|
||||
base = col;
|
||||
|
|
@ -761,7 +761,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<
|
|||
rigid_body->set_transform(mi->get_transform() * get_collision_shapes_transform(node_settings));
|
||||
p_node = rigid_body;
|
||||
mi->set_transform(Transform3D());
|
||||
rigid_body->add_child(mi);
|
||||
rigid_body->add_child(mi, true);
|
||||
mi->set_owner(rigid_body->get_owner());
|
||||
base = rigid_body;
|
||||
} break;
|
||||
|
|
@ -790,7 +790,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<
|
|||
for (const Ref<Shape3D> &E : shapes) {
|
||||
CollisionShape3D *cshape = memnew(CollisionShape3D);
|
||||
cshape->set_shape(E);
|
||||
base->add_child(cshape);
|
||||
base->add_child(cshape, true);
|
||||
|
||||
cshape->set_owner(base->get_owner());
|
||||
idx++;
|
||||
|
|
@ -823,7 +823,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<
|
|||
memdelete(p_node);
|
||||
p_node = nmi;
|
||||
} else {
|
||||
mi->add_child(nmi);
|
||||
mi->add_child(nmi, true);
|
||||
nmi->set_owner(mi->get_owner());
|
||||
}
|
||||
}
|
||||
|
|
@ -1680,7 +1680,7 @@ void ResourceImporterScene::_add_shapes(Node *p_node, const Vector<Ref<Shape3D>>
|
|||
for (const Ref<Shape3D> &E : p_shapes) {
|
||||
CollisionShape3D *cshape = memnew(CollisionShape3D);
|
||||
cshape->set_shape(E);
|
||||
p_node->add_child(cshape);
|
||||
p_node->add_child(cshape, true);
|
||||
|
||||
cshape->set_owner(p_node->get_owner());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue