summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamille Mohr-Daurat <pouleyKetchoup@gmail.com>2021-11-05 15:08:57 -0700
committerGitHub <noreply@github.com>2021-11-05 15:08:57 -0700
commit70c82d9d3d8bce1510d3e910a03627567d2c5741 (patch)
treea72bdd9095907a1b3bf5ca3a923fe1cf54bc6620
parent13aaa7312427e98661dba0183cbbee6bbc8f6542 (diff)
parent03903fdeec0023d4c504a7399d248257e6756f4c (diff)
Merge pull request #54642 from BoilingFusion/master
Fix the volume calculation for cylinders
-rw-r--r--servers/physics_3d/godot_shape_3d.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/physics_3d/godot_shape_3d.h b/servers/physics_3d/godot_shape_3d.h
index 8822d9487b..67497ba9b7 100644
--- a/servers/physics_3d/godot_shape_3d.h
+++ b/servers/physics_3d/godot_shape_3d.h
@@ -256,7 +256,7 @@ public:
_FORCE_INLINE_ real_t get_height() const { return height; }
_FORCE_INLINE_ real_t get_radius() const { return radius; }
- virtual real_t get_area() const override { return 4.0 / 3.0 * Math_PI * radius * radius * radius + height * Math_PI * radius * radius; }
+ virtual real_t get_area() const override { return height * Math_PI * radius * radius; }
virtual PhysicsServer3D::ShapeType get_type() const override { return PhysicsServer3D::SHAPE_CYLINDER; }