diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-04 11:52:11 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-04 11:52:11 +0200 |
commit | 8efe58476d51f4a5558ee259e5113c85328464ee (patch) | |
tree | 9ebb1632d2c71ef872d7f8cbe02a22e8351b38ca /editor | |
parent | 471ddf43273a87cf1f5e3d216c883852b5fdc5bf (diff) | |
parent | 51af186bb63b083d6ff878916e324176d706d0f1 (diff) | |
download | redot-engine-8efe58476d51f4a5558ee259e5113c85328464ee.tar.gz |
Merge pull request #89461 from Calinou/3d-import-collision-default-trimesh
Default to trimesh for generated collision shapes in Advanced Import Settings
Diffstat (limited to 'editor')
-rw-r--r-- | editor/import/3d/resource_importer_scene.cpp | 2 | ||||
-rw-r--r-- | editor/import/3d/resource_importer_scene.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/editor/import/3d/resource_importer_scene.cpp b/editor/import/3d/resource_importer_scene.cpp index 2560d43241..bb833b1b2c 100644 --- a/editor/import/3d/resource_importer_scene.cpp +++ b/editor/import/3d/resource_importer_scene.cpp @@ -1949,7 +1949,7 @@ void ResourceImporterScene::get_internal_import_options(InternalImportCategory p r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "generate/physics", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "generate/navmesh", PROPERTY_HINT_ENUM, "Disabled,Mesh + NavMesh,NavMesh Only"), 0)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "physics/body_type", PROPERTY_HINT_ENUM, "Static,Dynamic,Area"), 0)); - r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "physics/shape_type", PROPERTY_HINT_ENUM, "Decompose Convex,Simple Convex,Trimesh,Box,Sphere,Cylinder,Capsule", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 0)); + r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "physics/shape_type", PROPERTY_HINT_ENUM, "Decompose Convex,Simple Convex,Trimesh,Box,Sphere,Cylinder,Capsule", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 2)); r_options->push_back(ImportOption(PropertyInfo(Variant::OBJECT, "physics/physics_material_override", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsMaterial"), Variant())); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "physics/layer", PROPERTY_HINT_LAYERS_3D_PHYSICS), 1)); r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "physics/mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), 1)); diff --git a/editor/import/3d/resource_importer_scene.h b/editor/import/3d/resource_importer_scene.h index b55ff94309..bbf2d20163 100644 --- a/editor/import/3d/resource_importer_scene.h +++ b/editor/import/3d/resource_importer_scene.h @@ -323,7 +323,7 @@ public: template <typename M> Vector<Ref<Shape3D>> ResourceImporterScene::get_collision_shapes(const Ref<ImporterMesh> &p_mesh, const M &p_options, float p_applied_root_scale) { ERR_FAIL_COND_V(p_mesh.is_null(), Vector<Ref<Shape3D>>()); - ShapeType generate_shape_type = SHAPE_TYPE_DECOMPOSE_CONVEX; + ShapeType generate_shape_type = SHAPE_TYPE_TRIMESH; if (p_options.has(SNAME("physics/shape_type"))) { generate_shape_type = (ShapeType)p_options[SNAME("physics/shape_type")].operator int(); } @@ -481,7 +481,7 @@ template <typename M> Transform3D ResourceImporterScene::get_collision_shapes_transform(const M &p_options) { Transform3D transform; - ShapeType generate_shape_type = SHAPE_TYPE_DECOMPOSE_CONVEX; + ShapeType generate_shape_type = SHAPE_TYPE_TRIMESH; if (p_options.has(SNAME("physics/shape_type"))) { generate_shape_type = (ShapeType)p_options[SNAME("physics/shape_type")].operator int(); } |