You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Split Geometry singleton into Geometry2D and Geometry3D
Extra `_2d` suffixes are removed from 2D methods accoringly.
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "canvas_item_editor_plugin.h"
|
||||
#include "core/input/input.h"
|
||||
#include "core/math/geometry_2d.h"
|
||||
#include "core/os/file_access.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "editor/editor_settings.h"
|
||||
@@ -196,7 +197,7 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
|
||||
p_camera->unproject_position(gt.xform(Vector3(poly[(i + 1) % poly.size()].x, poly[(i + 1) % poly.size()].y, depth)))
|
||||
};
|
||||
|
||||
Vector2 cp = Geometry::get_closest_point_to_segment_2d(gpoint, points);
|
||||
Vector2 cp = Geometry2D::get_closest_point_to_segment(gpoint, points);
|
||||
if (cp.distance_squared_to(points[0]) < CMP_EPSILON2 || cp.distance_squared_to(points[1]) < CMP_EPSILON2) {
|
||||
continue; //not valid to reuse point
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user