Merge pull request #15093 from poke1024/canvas-editor-select
More exact picking for canvas editor
This commit is contained in:
commit
459ee51338
31 changed files with 345 additions and 46 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue