Fix the volume calculation for cylinders

(cherry picked from commit 03903fdeec)
This commit is contained in:
Julian Adamse 2021-11-05 20:46:32 +01:00 committed by Rémi Verschelde
parent 509f3c75a2
commit 7e5034958e
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -239,7 +239,7 @@ public:
_FORCE_INLINE_ real_t get_height() const { return height; } _FORCE_INLINE_ real_t get_height() const { return height; }
_FORCE_INLINE_ real_t get_radius() const { return radius; } _FORCE_INLINE_ real_t get_radius() const { return radius; }
virtual real_t get_area() const { return 4.0 / 3.0 * Math_PI * radius * radius * radius + height * Math_PI * radius * radius; } virtual real_t get_area() const { return height * Math_PI * radius * radius; }
virtual PhysicsServer::ShapeType get_type() const { return PhysicsServer::SHAPE_CAPSULE; } virtual PhysicsServer::ShapeType get_type() const { return PhysicsServer::SHAPE_CAPSULE; }