summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-16 13:47:20 +0200
committerGitHub <noreply@github.com>2022-05-16 13:47:20 +0200
commit9ba0fac1ba090946afcdbcee5fb0107a4c688e59 (patch)
tree415b807efb0b29b6d7f586fc2dc96934faeaa928 /scene/3d
parent95da5436dcc8a7a4df290923b760ad0a910baaed (diff)
parent001d89223f1377717d2b3d5ec453ff8dd3604182 (diff)
Merge pull request #61038 from smix8/navigation_obstacle_rid_config_warn_4.x
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/navigation_obstacle_3d.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/scene/3d/navigation_obstacle_3d.cpp b/scene/3d/navigation_obstacle_3d.cpp
index 78dbecc0c5..15a0e4e437 100644
--- a/scene/3d/navigation_obstacle_3d.cpp
+++ b/scene/3d/navigation_obstacle_3d.cpp
@@ -35,6 +35,8 @@
#include "servers/navigation_server_3d.h"
void NavigationObstacle3D::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("get_rid"), &NavigationObstacle3D::get_rid);
+
ClassDB::bind_method(D_METHOD("set_estimate_radius", "estimate_radius"), &NavigationObstacle3D::set_estimate_radius);
ClassDB::bind_method(D_METHOD("is_radius_estimated"), &NavigationObstacle3D::is_radius_estimated);
ClassDB::bind_method(D_METHOD("set_radius", "radius"), &NavigationObstacle3D::set_radius);
@@ -107,7 +109,12 @@ TypedArray<String> NavigationObstacle3D::get_configuration_warnings() const {
TypedArray<String> warnings = Node::get_configuration_warnings();
if (!Object::cast_to<Node3D>(get_parent())) {
- warnings.push_back(RTR("The NavigationObstacle3D only serves to provide collision avoidance to a spatial object."));
+ warnings.push_back(RTR("The NavigationObstacle3D only serves to provide collision avoidance to a Node3D inheriting parent object."));
+ }
+
+ if (Object::cast_to<StaticBody3D>(get_parent())) {
+ warnings.push_back(RTR("The NavigationObstacle3D is intended for constantly moving bodies like CharacterBody3D or RigidDynamicBody3D as it creates only an RVO avoidance radius and does not follow scene geometry exactly."
+ "\nNot constantly moving or complete static objects should be (re)baked to a NavigationMesh so agents can not only avoid them but also move along those objects outline at high detail"));
}
return warnings;