From fa7322eac992a3585e97c63cb6ba35c85f4c847b Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Fri, 29 Feb 2008 06:55:31 +0000 Subject: * Fixed Cylinder mass formula using diameter instead of radius. --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 3c47e27..34c5cfd 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -357,8 +357,8 @@ namespace OpenSim.Region.Physics.OdePlugin if (_pbs.PathCurve == (byte)Extrusion.Straight) { // Cylinder - float volume1 = (float)(Math.PI * Math.Pow(_size.X, 2) * _size.Z); - float volume2 = (float)(Math.PI * Math.Pow(_size.Y, 2) * _size.Z); + float volume1 = (float)(Math.PI * Math.Pow(_size.X/2, 2) * _size.Z); + float volume2 = (float)(Math.PI * Math.Pow(_size.Y/2, 2) * _size.Z); // Approximating the cylinder's irregularity. if (volume1 > volume2) -- cgit v1.1