summaryrefslogtreecommitdiffstats
path: root/editor/plugins/collision_shape_2d_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/collision_shape_2d_editor_plugin.cpp')
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp
index 2c2adc2672..5a6b7d98d3 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -37,7 +37,6 @@
#include "scene/resources/concave_polygon_shape_2d.h"
#include "scene/resources/convex_polygon_shape_2d.h"
#include "scene/resources/line_shape_2d.h"
-#include "scene/resources/ray_shape_2d.h"
#include "scene/resources/rectangle_shape_2d.h"
#include "scene/resources/segment_shape_2d.h"
@@ -86,15 +85,6 @@ Variant CollisionShape2DEditor::get_handle_value(int idx) const {
} break;
- case RAY_SHAPE: {
- Ref<RayShape2D> ray = node->get_shape();
-
- if (idx == 0) {
- return ray->get_length();
- }
-
- } break;
-
case RECTANGLE_SHAPE: {
Ref<RectangleShape2D> rect = node->get_shape();
@@ -167,15 +157,6 @@ void CollisionShape2DEditor::set_handle(int idx, Point2 &p_point) {
} break;
- case RAY_SHAPE: {
- Ref<RayShape2D> ray = node->get_shape();
-
- ray->set_length(Math::abs(p_point.y));
-
- canvas_item_editor->update_viewport();
-
- } break;
-
case RECTANGLE_SHAPE: {
if (idx < 8) {
Ref<RectangleShape2D> rect = node->get_shape();
@@ -277,16 +258,6 @@ void CollisionShape2DEditor::commit_handle(int idx, Variant &p_org) {
} break;
- case RAY_SHAPE: {
- Ref<RayShape2D> ray = node->get_shape();
-
- undo_redo->add_do_method(ray.ptr(), "set_length", ray->get_length());
- undo_redo->add_do_method(canvas_item_editor, "update_viewport");
- undo_redo->add_undo_method(ray.ptr(), "set_length", p_org);
- undo_redo->add_undo_method(canvas_item_editor, "update_viewport");
-
- } break;
-
case RECTANGLE_SHAPE: {
Ref<RectangleShape2D> rect = node->get_shape();
@@ -428,8 +399,6 @@ void CollisionShape2DEditor::_get_current_shape_type() {
shape_type = CONVEX_POLYGON_SHAPE;
} else if (Object::cast_to<LineShape2D>(*s)) {
shape_type = LINE_SHAPE;
- } else if (Object::cast_to<RayShape2D>(*s)) {
- shape_type = RAY_SHAPE;
} else if (Object::cast_to<RectangleShape2D>(*s)) {
shape_type = RECTANGLE_SHAPE;
} else if (Object::cast_to<SegmentShape2D>(*s)) {
@@ -507,16 +476,6 @@ void CollisionShape2DEditor::forward_canvas_draw_over_viewport(Control *p_overla
} break;
- case RAY_SHAPE: {
- Ref<RayShape2D> shape = node->get_shape();
-
- handles.resize(1);
- handles.write[0] = Point2(0, shape->get_length());
-
- p_overlay->draw_texture(h, gt.xform(handles[0]) - size);
-
- } break;
-
case RECTANGLE_SHAPE: {
Ref<RectangleShape2D> shape = node->get_shape();