BulletSim: reorder avatar collision checking to eliminate double collision_end.

Various tweekings to avatar shape/mass/inertia/etc.
Remove change from avatar radius to diameter. But still the avatar sinks.
Collision_end now happens immediately rather than at the next subscription time.
This commit is contained in:
Robert Adams
2012-10-19 10:48:45 -07:00
parent e87a179c89
commit f422b9b388
6 changed files with 44 additions and 36 deletions

View File

@@ -417,10 +417,9 @@ public class BSShapeCollection : IDisposable
if (shapeType == ShapeData.PhysicsShapeType.SHAPE_AVATAR)
{
// 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);
BulletSimAPI.BuildCapsuleShape2(PhysicsScene.World.ptr, 1.0f, 1.0f, shapeData.Scale),
shapeType);
newShape.shapeKey = (System.UInt64)shapeKey;
newShape.isNativeShape = true;
}
@@ -432,7 +431,8 @@ public class BSShapeCollection : IDisposable
}
// Don't need to do a 'ReferenceShape()' here because native shapes are not shared.
// DetailLog("{0},BSShapeCollection.AddNativeShapeToPrim,create,newshape={1}", shapeData.ID, newShape);
DetailLog("{0},BSShapeCollection.AddNativeShapeToPrim,create,newshape={1},scale={2}",
shapeData.ID, newShape, shapeData.Scale);
prim.BSShape = newShape;
return true;