Merge pull request #83816 from smix8/navobstacle_properties
Fix missing NavigationObstacle property updates in constructor
This commit is contained in:
commit
4ce65c6190
|
@ -148,10 +148,10 @@ void NavigationObstacle2D::_notification(int p_what) {
|
|||
NavigationObstacle2D::NavigationObstacle2D() {
|
||||
obstacle = NavigationServer2D::get_singleton()->obstacle_create();
|
||||
|
||||
set_radius(radius);
|
||||
set_vertices(vertices);
|
||||
set_avoidance_layers(avoidance_layers);
|
||||
set_avoidance_enabled(avoidance_enabled);
|
||||
NavigationServer2D::get_singleton()->obstacle_set_radius(obstacle, radius);
|
||||
NavigationServer2D::get_singleton()->obstacle_set_vertices(obstacle, vertices);
|
||||
NavigationServer2D::get_singleton()->obstacle_set_avoidance_layers(obstacle, avoidance_layers);
|
||||
NavigationServer2D::get_singleton()->obstacle_set_avoidance_enabled(obstacle, avoidance_enabled);
|
||||
}
|
||||
|
||||
NavigationObstacle2D::~NavigationObstacle2D() {
|
||||
|
|
|
@ -167,13 +167,11 @@ NavigationObstacle3D::NavigationObstacle3D() {
|
|||
obstacle = NavigationServer3D::get_singleton()->obstacle_create();
|
||||
|
||||
NavigationServer3D::get_singleton()->obstacle_set_height(obstacle, height);
|
||||
|
||||
set_radius(radius);
|
||||
set_height(height);
|
||||
set_vertices(vertices);
|
||||
set_avoidance_layers(avoidance_layers);
|
||||
set_avoidance_enabled(avoidance_enabled);
|
||||
set_use_3d_avoidance(use_3d_avoidance);
|
||||
NavigationServer3D::get_singleton()->obstacle_set_radius(obstacle, radius);
|
||||
NavigationServer3D::get_singleton()->obstacle_set_vertices(obstacle, vertices);
|
||||
NavigationServer3D::get_singleton()->obstacle_set_avoidance_layers(obstacle, avoidance_layers);
|
||||
NavigationServer3D::get_singleton()->obstacle_set_use_3d_avoidance(obstacle, use_3d_avoidance);
|
||||
NavigationServer3D::get_singleton()->obstacle_set_avoidance_enabled(obstacle, avoidance_enabled);
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
NavigationServer3D::get_singleton()->connect("avoidance_debug_changed", callable_mp(this, &NavigationObstacle3D::_update_fake_agent_radius_debug));
|
||||
|
|
Loading…
Reference in New Issue