1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

replace confusing code in CapsuleShape2D

This commit is contained in:
golfinq
2023-10-19 23:41:55 -04:00
parent f8818f85e6
commit e03a65fdea

View File

@@ -373,8 +373,7 @@ void GodotCapsuleShape2D::get_supports(const Vector2 &p_normal, Vector2 *r_suppo
if (h > 0 && Math::abs(n.x) > segment_is_valid_support_threshold) {
// make it flat
n.y = 0.0;
n.normalize();
n *= radius;
n.x = SIGN(n.x) * radius;
r_amount = 2;
r_supports[0] = n;