diff options
| author | Rémi Verschelde | 2018-01-03 11:15:28 +0100 |
|---|---|---|
| committer | GitHub | 2018-01-03 11:15:28 +0100 |
| commit | 459ee51338ff9ffb8248a4351eee3b558438aa50 (patch) | |
| tree | b366aad4e6ee15907af75cb659f42b5ec79b6f58 /scene/2d/collision_polygon_2d.cpp | |
| parent | 0b235a5efa9f6825e638d98d9eaadcc11423b3c3 (diff) | |
| parent | 8505871a87b59b27acc0912a6dd815231c3b78b1 (diff) | |
| download | godot-459ee51338ff9ffb8248a4351eee3b558438aa50.tar.gz godot-459ee51338ff9ffb8248a4351eee3b558438aa50.tar.zst godot-459ee51338ff9ffb8248a4351eee3b558438aa50.zip | |
Diffstat (limited to 'scene/2d/collision_polygon_2d.cpp')
| -rw-r--r-- | scene/2d/collision_polygon_2d.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp index eaa650b14..e46bf3c77 100644 --- a/scene/2d/collision_polygon_2d.cpp +++ b/scene/2d/collision_polygon_2d.cpp @@ -248,6 +248,11 @@ Rect2 CollisionPolygon2D::_edit_get_rect() const { return aabb; } +bool CollisionPolygon2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const { + + return Geometry::is_point_in_polygon(p_point, Variant(polygon)); +} + String CollisionPolygon2D::get_configuration_warning() const { if (!Object::cast_to<CollisionObject2D>(get_parent())) { |
