Skip to content

Commit

Permalink
Merge pull request #82593 from smix8/navobstacle_debug_transform_4.x
Browse files Browse the repository at this point in the history
Fix NavigationObstacle3D debug being affected by rotation and scale
  • Loading branch information
akien-mga committed Oct 21, 2023
2 parents 6543495 + cbb9d21 commit 918da63
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scene/3d/navigation_obstacle_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,14 @@ void NavigationObstacle3D::_notification(int p_what) {
}
#ifdef DEBUG_ENABLED
if (fake_agent_radius_debug_instance.is_valid() && radius > 0.0) {
RS::get_singleton()->instance_set_transform(fake_agent_radius_debug_instance, get_global_transform());
Transform3D debug_transform;
debug_transform.origin = get_global_position();
RS::get_singleton()->instance_set_transform(fake_agent_radius_debug_instance, debug_transform);
}
if (static_obstacle_debug_instance.is_valid() && get_vertices().size() > 0) {
RS::get_singleton()->instance_set_transform(static_obstacle_debug_instance, get_global_transform());
Transform3D debug_transform;
debug_transform.origin = get_global_position();
RS::get_singleton()->instance_set_transform(static_obstacle_debug_instance, debug_transform);
}
#endif // DEBUG_ENABLED
}
Expand Down

0 comments on commit 918da63

Please sign in to comment.