浏览代码

Fix missing const in CapsuleShapeSW::get_area

Marcelo Fernandez 7 年之前
父节点
当前提交
9042ef3836
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      servers/physics/shape_sw.h

+ 1 - 1
servers/physics/shape_sw.h

@@ -240,7 +240,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() { return 4.0 / 3.0 * Math_PI * radius * radius * radius + height * Math_PI * radius * radius; }
+	virtual real_t get_area() const { return 4.0 / 3.0 * Math_PI * radius * radius * radius + height * Math_PI * radius * radius; }
 
 	virtual PhysicsServer::ShapeType get_type() const { return PhysicsServer::SHAPE_CAPSULE; }