summaryrefslogtreecommitdiff
path: root/scene/resources/line_shape_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/line_shape_2d.cpp')
-rw-r--r--scene/resources/line_shape_2d.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/scene/resources/line_shape_2d.cpp b/scene/resources/line_shape_2d.cpp
index 7f39467403..d1bb61820b 100644
--- a/scene/resources/line_shape_2d.cpp
+++ b/scene/resources/line_shape_2d.cpp
@@ -100,6 +100,10 @@ Rect2 LineShape2D::get_rect() const {
return rect;
}
+real_t LineShape2D::get_enclosing_radius() const {
+ return d;
+}
+
void LineShape2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_normal", "normal"), &LineShape2D::set_normal);
@@ -115,7 +119,7 @@ void LineShape2D::_bind_methods() {
LineShape2D::LineShape2D() :
Shape2D(Physics2DServer::get_singleton()->line_shape_create()) {
- normal = Vector2(0, -1);
+ normal = Vector2(0, 1);
d = 0;
_update_shape();
}