Skip to content

Commit

Permalink
Merge pull request godotengine#54642 from BoilingFusion/master
Browse files Browse the repository at this point in the history
Fix the volume calculation for cylinders
  • Loading branch information
pouleyKetchoupp authored Nov 5, 2021
2 parents 13aaa73 + 03903fd commit 70c82d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion servers/physics_3d/godot_shape_3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class GodotCylinderShape3D : public GodotShape3D {
_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; }

Expand Down

0 comments on commit 70c82d9

Please sign in to comment.