Merge pull request #57081 from Scony/fix-navigation-2d-defaults-3.x

This commit is contained in:
Rémi Verschelde 2022-01-23 17:25:14 +01:00 committed by GitHub
commit f2ec36fbcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -41,10 +41,10 @@
</method> </method>
</methods> </methods>
<members> <members>
<member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="10.0"> <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="1.0">
The XY plane cell size to use for fields. The XY plane cell size to use for fields.
</member> </member>
<member name="edge_connection_margin" type="float" setter="set_edge_connection_margin" getter="get_edge_connection_margin" default="100.0"> <member name="edge_connection_margin" type="float" setter="set_edge_connection_margin" getter="get_edge_connection_margin" default="1.0">
This value is used to detect the near edges to connect compatible regions. This value is used to detect the near edges to connect compatible regions.
</member> </member>
</members> </members>

View File

@ -84,8 +84,8 @@ RID Navigation2D::get_closest_point_owner(const Vector2 &p_point) const {
Navigation2D::Navigation2D() { Navigation2D::Navigation2D() {
map = Navigation2DServer::get_singleton()->map_create(); map = Navigation2DServer::get_singleton()->map_create();
set_cell_size(10); // Ten pixels set_cell_size(1); // One pixel
set_edge_connection_margin(100); set_edge_connection_margin(1);
} }
Navigation2D::~Navigation2D() { Navigation2D::~Navigation2D() {