aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
diff options
context:
space:
mode:
authorRobert Adams2012-10-17 08:30:10 -0700
committerRobert Adams2012-10-19 10:52:23 -0700
commite87a179c893ef246dae8338e0f56c3fe20458fbc (patch)
tree1699e1fc26a47ba000bbd2392df894dc3247f956 /OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
parentBulletSim: remove code in ShapeCollection that hinted at shape sharing. (diff)
downloadopensim-SC_OLD-e87a179c893ef246dae8338e0f56c3fe20458fbc.zip
opensim-SC_OLD-e87a179c893ef246dae8338e0f56c3fe20458fbc.tar.gz
opensim-SC_OLD-e87a179c893ef246dae8338e0f56c3fe20458fbc.tar.bz2
opensim-SC_OLD-e87a179c893ef246dae8338e0f56c3fe20458fbc.tar.xz
BulletSim: change nonimal physics frame rate to 55 to give same numbers as ODE.
Change character scaling to represent size of capsule (diameter rather than radius) Modify create capsule call to pass radius and height. Eliminate errors when calculating shape inertia (should have some type checking).
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
index bbfdac6..3d15eaa 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
@@ -417,7 +417,10 @@ public class BSShapeCollection : IDisposable
417 417
418 if (shapeType == ShapeData.PhysicsShapeType.SHAPE_AVATAR) 418 if (shapeType == ShapeData.PhysicsShapeType.SHAPE_AVATAR)
419 { 419 {
420 newShape = new BulletShape(BulletSimAPI.BuildCapsuleShape2(PhysicsScene.World.ptr, shapeData), shapeType); 420 // The radius is scaled by 1/2 because we scale by the diameter.
421 newShape = new BulletShape(
422 BulletSimAPI.BuildCapsuleShape2(PhysicsScene.World.ptr, 0.5f, 1.0f, shapeData.Scale),
423 shapeType);
421 newShape.shapeKey = (System.UInt64)shapeKey; 424 newShape.shapeKey = (System.UInt64)shapeKey;
422 newShape.isNativeShape = true; 425 newShape.isNativeShape = true;
423 } 426 }
@@ -428,7 +431,7 @@ public class BSShapeCollection : IDisposable
428 newShape.isNativeShape = true; 431 newShape.isNativeShape = true;
429 } 432 }
430 433
431 // Don't need to do a 'ReferenceShape()' here because native shapes are not tracked. 434 // Don't need to do a 'ReferenceShape()' here because native shapes are not shared.
432 // DetailLog("{0},BSShapeCollection.AddNativeShapeToPrim,create,newshape={1}", shapeData.ID, newShape); 435 // DetailLog("{0},BSShapeCollection.AddNativeShapeToPrim,create,newshape={1}", shapeData.ID, newShape);
433 436
434 prim.BSShape = newShape; 437 prim.BSShape = newShape;