summaryrefslogtreecommitdiff
path: root/scene/resources/convex_polygon_shape_3d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/convex_polygon_shape_3d.cpp')
-rw-r--r--scene/resources/convex_polygon_shape_3d.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/scene/resources/convex_polygon_shape_3d.cpp b/scene/resources/convex_polygon_shape_3d.cpp
index ec9ab68015..e52df73663 100644
--- a/scene/resources/convex_polygon_shape_3d.cpp
+++ b/scene/resources/convex_polygon_shape_3d.cpp
@@ -33,11 +33,9 @@
#include "servers/physics_server_3d.h"
Vector<Vector3> ConvexPolygonShape3D::get_debug_mesh_lines() {
-
Vector<Vector3> points = get_points();
if (points.size() > 3) {
-
Vector<Vector3> varr = Variant(points);
Geometry::MeshData md;
Error err = QuickHull::build(varr, md);
@@ -66,25 +64,21 @@ real_t ConvexPolygonShape3D::get_enclosing_radius() const {
}
void ConvexPolygonShape3D::_update_shape() {
-
PhysicsServer3D::get_singleton()->shape_set_data(get_shape(), points);
Shape3D::_update_shape();
}
void ConvexPolygonShape3D::set_points(const Vector<Vector3> &p_points) {
-
points = p_points;
_update_shape();
notify_change_to_owners();
}
Vector<Vector3> ConvexPolygonShape3D::get_points() const {
-
return points;
}
void ConvexPolygonShape3D::_bind_methods() {
-
ClassDB::bind_method(D_METHOD("set_points", "points"), &ConvexPolygonShape3D::set_points);
ClassDB::bind_method(D_METHOD("get_points"), &ConvexPolygonShape3D::get_points);