aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
index 1f7c398..bc9f9be 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
@@ -192,6 +192,8 @@ public sealed class BSLinksetCompound : BSLinkset
192 child.LocalID, child.PhysBody.ptr.ToString("X")); 192 child.LocalID, child.PhysBody.ptr.ToString("X"));
193 193
194 // Cause the child's body to be rebuilt and thus restored to normal operation 194 // Cause the child's body to be rebuilt and thus restored to normal operation
195 // TODO: position and rotation must be restored because the child could have moved
196 // based on the linkset.
195 child.ForceBodyShapeRebuild(false); 197 child.ForceBodyShapeRebuild(false);
196 198
197 if (!HasAnyChildren) 199 if (!HasAnyChildren)
@@ -236,9 +238,10 @@ public sealed class BSLinksetCompound : BSLinkset
236 238
237 if (cPrim.PhysShape.isNativeShape) 239 if (cPrim.PhysShape.isNativeShape)
238 { 240 {
239 // Native shapes are not shared so we need to create a new one. 241 // A native shape is turning into a null collision shape because native
240 // A mesh or hull is created because scale is not available on a native shape. 242 // shapes are not shared so we have to hullify it so it will be tracked
241 // (TODO: Bullet does have a btScaledCollisionShape. Can that be used?) 243 // and freed at the correct time. This also solves the scaling problem
244 // (native shapes scaled but hull/meshes are assumed to not be).
242 BulletShape saveShape = cPrim.PhysShape; 245 BulletShape saveShape = cPrim.PhysShape;
243 cPrim.PhysShape.ptr = IntPtr.Zero; // Don't let the create free the child's shape 246 cPrim.PhysShape.ptr = IntPtr.Zero; // Don't let the create free the child's shape
244 PhysicsScene.Shapes.CreateGeomMeshOrHull(cPrim, null); 247 PhysicsScene.Shapes.CreateGeomMeshOrHull(cPrim, null);