Skip to content

Commit

Permalink
Merge pull request #83655 from golfinq/small-capsule-shape-fix
Browse files Browse the repository at this point in the history
Replace confusing code in GodotCapsuleShape2D::get_supports
  • Loading branch information
YuriSizov committed Dec 22, 2023
2 parents bb1cdc1 + e03a65f commit 6b40371
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions servers/physics_2d/godot_shape_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6b40371

Please sign in to comment.