diff options
author | Andrea Catania <info@andreacatania.com> | 2020-01-10 12:22:34 +0100 |
---|---|---|
committer | Andrea Catania <info@andreacatania.com> | 2020-02-10 14:38:52 +0100 |
commit | e6be3f68da4b88cb0c7d8c7464916235c73e1f92 (patch) | |
tree | 2e65162fd1937df8b4dcd80900dd5b9b4aac58d1 /scene/resources/rectangle_shape_2d.cpp | |
parent | 8cd5102c65269f1ec4968627ca71df550954d914 (diff) | |
download | redot-engine-e6be3f68da4b88cb0c7d8c7464916235c73e1f92.tar.gz |
- Integrated NavigationServer and Navigation2DServer.
- Added Navigation Agents and Obstacles.
- Integrated Collision Avoidance.
This work has been kindly sponsored by IMVU.
Diffstat (limited to 'scene/resources/rectangle_shape_2d.cpp')
-rw-r--r-- | scene/resources/rectangle_shape_2d.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/resources/rectangle_shape_2d.cpp b/scene/resources/rectangle_shape_2d.cpp index 0030e6dd4f..f8c8ffb289 100644 --- a/scene/resources/rectangle_shape_2d.cpp +++ b/scene/resources/rectangle_shape_2d.cpp @@ -59,6 +59,10 @@ Rect2 RectangleShape2D::get_rect() const { return Rect2(-extents, extents * 2.0); } +real_t RectangleShape2D::get_enclosing_radius() const { + return extents.length(); +} + void RectangleShape2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_extents", "extents"), &RectangleShape2D::set_extents); |