mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
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).
This commit is contained in:
@@ -417,7 +417,10 @@ public class BSShapeCollection : IDisposable
|
||||
|
||||
if (shapeType == ShapeData.PhysicsShapeType.SHAPE_AVATAR)
|
||||
{
|
||||
newShape = new BulletShape(BulletSimAPI.BuildCapsuleShape2(PhysicsScene.World.ptr, shapeData), shapeType);
|
||||
// The radius is scaled by 1/2 because we scale by the diameter.
|
||||
newShape = new BulletShape(
|
||||
BulletSimAPI.BuildCapsuleShape2(PhysicsScene.World.ptr, 0.5f, 1.0f, shapeData.Scale),
|
||||
shapeType);
|
||||
newShape.shapeKey = (System.UInt64)shapeKey;
|
||||
newShape.isNativeShape = true;
|
||||
}
|
||||
@@ -428,7 +431,7 @@ public class BSShapeCollection : IDisposable
|
||||
newShape.isNativeShape = true;
|
||||
}
|
||||
|
||||
// Don't need to do a 'ReferenceShape()' here because native shapes are not tracked.
|
||||
// Don't need to do a 'ReferenceShape()' here because native shapes are not shared.
|
||||
// DetailLog("{0},BSShapeCollection.AddNativeShapeToPrim,create,newshape={1}", shapeData.ID, newShape);
|
||||
|
||||
prim.BSShape = newShape;
|
||||
|
||||
Reference in New Issue
Block a user