Merge pull request #15093 from poke1024/canvas-editor-select

More exact picking for canvas editor
This commit is contained in:
Rémi Verschelde 2018-01-03 11:15:28 +01:00 committed by GitHub
commit 459ee51338
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 345 additions and 46 deletions

View file

@ -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);