diff options
| author | Bernhard Liebl | 2017-12-27 09:28:02 +0100 |
|---|---|---|
| committer | Bernhard Liebl | 2017-12-27 20:24:58 +0100 |
| commit | 8505871a87b59b27acc0912a6dd815231c3b78b1 (patch) | |
| tree | 31a4fdc7afe2cd3960380fa7695d508f54c043a2 /scene/resources/convex_polygon_shape_2d.cpp | |
| parent | 32d8b99bc31e3762ae0dc017a05567da2802a313 (diff) | |
| download | godot-8505871a87b59b27acc0912a6dd815231c3b78b1.tar.gz godot-8505871a87b59b27acc0912a6dd815231c3b78b1.tar.zst godot-8505871a87b59b27acc0912a6dd815231c3b78b1.zip | |
Diffstat (limited to 'scene/resources/convex_polygon_shape_2d.cpp')
| -rw-r--r-- | scene/resources/convex_polygon_shape_2d.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/resources/convex_polygon_shape_2d.cpp b/scene/resources/convex_polygon_shape_2d.cpp index 9c25b6b46..bf8183d0c 100644 --- a/scene/resources/convex_polygon_shape_2d.cpp +++ b/scene/resources/convex_polygon_shape_2d.cpp @@ -33,6 +33,11 @@ #include "servers/physics_2d_server.h" #include "servers/visual_server.h" +bool ConvexPolygonShape2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const { + + return Geometry::is_point_in_polygon(p_point, points); +} + void ConvexPolygonShape2D::_update_shape() { Physics2DServer::get_singleton()->shape_set_data(get_rid(), points); |
