Skip to content

Commit 3a57f10

Browse files
committed
Merge pull request godotengine#90602 from smix8/bsfmod
Use fmod for navigation mesh border size warning
2 parents a66bc02 + 8a0f1f1 commit 3a57f10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/navigation/3d/nav_mesh_generator_3d.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ void NavMeshGenerator3D::generator_bake_from_source_geometry_data(Ref<Navigation
700700
cfg.detailSampleDist = MAX(p_navigation_mesh->get_cell_size() * p_navigation_mesh->get_detail_sample_distance(), 0.1f);
701701
cfg.detailSampleMaxError = p_navigation_mesh->get_cell_height() * p_navigation_mesh->get_detail_sample_max_error();
702702

703-
if (p_navigation_mesh->get_border_size() > 0.0 && !Math::is_equal_approx(p_navigation_mesh->get_cell_size(), p_navigation_mesh->get_border_size())) {
703+
if (p_navigation_mesh->get_border_size() > 0.0 && Math::fmod(p_navigation_mesh->get_border_size(), p_navigation_mesh->get_cell_size()) != 0.0) {
704704
WARN_PRINT("Property border_size is ceiled to cell_size voxel units and loses precision.");
705705
}
706706
if (!Math::is_equal_approx((float)cfg.walkableHeight * cfg.ch, p_navigation_mesh->get_agent_height())) {

0 commit comments

Comments
 (0)