mirror of
https://github.com/godotengine/godot
synced 2024-09-15 23:16:38 +00:00
Merge pull request #83655 from golfinq/small-capsule-shape-fix
Replace confusing code in GodotCapsuleShape2D::get_supports
This commit is contained in:
commit
6b403712f1
|
@ -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) {
|
if (h > 0 && Math::abs(n.x) > segment_is_valid_support_threshold) {
|
||||||
// make it flat
|
// make it flat
|
||||||
n.y = 0.0;
|
n.y = 0.0;
|
||||||
n.normalize();
|
n.x = SIGN(n.x) * radius;
|
||||||
n *= radius;
|
|
||||||
|
|
||||||
r_amount = 2;
|
r_amount = 2;
|
||||||
r_supports[0] = n;
|
r_supports[0] = n;
|
||||||
|
|
Loading…
Reference in a new issue