mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 12:25:42 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user