summaryrefslogtreecommitdiff
path: root/scene/3d/mesh_instance_3d.cpp
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2022-11-25 11:43:06 -0600
committerAaron Franke <arnfranke@yahoo.com>2022-11-25 11:43:11 -0600
commit93ab82536da201ffb154d4441d994ee7772b0529 (patch)
tree6f8ebf0bd35a3311e9c8fac30d66e7c38d93baf1 /scene/3d/mesh_instance_3d.cpp
parenta9fbf3718d4f8455dee1ebad05374d7baf714370 (diff)
Use a more specific type for Mesh create_(convex|trimesh)_shape
Diffstat (limited to 'scene/3d/mesh_instance_3d.cpp')
-rw-r--r--scene/3d/mesh_instance_3d.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/scene/3d/mesh_instance_3d.cpp b/scene/3d/mesh_instance_3d.cpp
index d4f60503c2..04d164ba88 100644
--- a/scene/3d/mesh_instance_3d.cpp
+++ b/scene/3d/mesh_instance_3d.cpp
@@ -33,6 +33,8 @@
#include "collision_shape_3d.h"
#include "core/core_string_names.h"
#include "physics_body_3d.h"
+#include "scene/resources/concave_polygon_shape_3d.h"
+#include "scene/resources/convex_polygon_shape_3d.h"
bool MeshInstance3D::_set(const StringName &p_name, const Variant &p_value) {
//this is not _too_ bad performance wise, really. it only arrives here if the property was not set anywhere else.
@@ -224,7 +226,7 @@ Node *MeshInstance3D::create_trimesh_collision_node() {
return nullptr;
}
- Ref<Shape3D> shape = mesh->create_trimesh_shape();
+ Ref<ConcavePolygonShape3D> shape = mesh->create_trimesh_shape();
if (shape.is_null()) {
return nullptr;
}
@@ -254,7 +256,7 @@ Node *MeshInstance3D::create_convex_collision_node(bool p_clean, bool p_simplify
return nullptr;
}
- Ref<Shape3D> shape = mesh->create_convex_shape(p_clean, p_simplify);
+ Ref<ConvexPolygonShape3D> shape = mesh->create_convex_shape(p_clean, p_simplify);
if (shape.is_null()) {
return nullptr;
}