-
-
Notifications
You must be signed in to change notification settings - Fork 23.6k
Remove unused Shape2D/3D::get_enclosing_radius method
#112920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Remove unused Shape2D/3D::get_enclosing_radius method
#112920
Conversation
|
Can we figure out the original user scenario for having get enclosing radius before removing? |
They were added in #34776, and were used here: godot/scene/2d/navigation_obstacle_2d.cpp Lines 118 to 131 in e6be3f6
godot/scene/3d/navigation_obstacle.cpp Lines 127 to 140 in e6be3f6
|
|
I wonder the cause of deletion https://github.com/godotengine/godot/blob/master/scene/3d/navigation/navigation_obstacle_3d.cpp. However, if we don't use it in navigation anymore, then removing get enclosing radius makes sense. |
Can safely remove that. It was a misguided attempt to dynamically update the avoidance radius with changing physics shapes. The result was that most users had broken avoidance because their physics shapes messed up their avoidance setup. The original obstacle code had a special code just for physics rigid body parents to calculate broken velocity on top. All that got removed but that function was forgotten. |
Removes dead code:
Shape2D::get_enclosing_radiusandShape3D::get_enclosing_radiusvirtual methods, and all their overrides. These methods are non-exposed, and are unused internally.(not sure about labels for this PR)