diff --git a/crates/bevy_math/src/sampling/shape_sampling.rs b/crates/bevy_math/src/sampling/shape_sampling.rs index 10f9e17f60..10d99f8a8b 100644 --- a/crates/bevy_math/src/sampling/shape_sampling.rs +++ b/crates/bevy_math/src/sampling/shape_sampling.rs @@ -450,7 +450,7 @@ impl ShapeSample for Capsule2d { if capsule_area > 0.0 { // Check if the random point should be inside the rectangle if rng.gen_bool((rectangle_area / capsule_area) as f64) { - let rectangle = Rectangle::new(self.radius, self.half_length * 2.0); + let rectangle = Rectangle::new(self.radius * 2.0, self.half_length * 2.0); rectangle.sample_interior(rng) } else { let circle = Circle::new(self.radius);