diff options
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs index 0077da7..d8e4028 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs | |||
@@ -377,7 +377,7 @@ public sealed class BSLinksetCompound : BSLinkset | |||
377 | // Constraint linksets are rebuilt every time. | 377 | // Constraint linksets are rebuilt every time. |
378 | // Note that this works for rebuilding just the root after a linkset is taken apart. | 378 | // Note that this works for rebuilding just the root after a linkset is taken apart. |
379 | // Called at taint time!! | 379 | // Called at taint time!! |
380 | private bool disableCOM = true; // disable until we get this debugged | 380 | private bool disableCOM = false; // disable until we get this debugged |
381 | private void RecomputeLinksetCompound() | 381 | private void RecomputeLinksetCompound() |
382 | { | 382 | { |
383 | try | 383 | try |
@@ -400,8 +400,9 @@ public sealed class BSLinksetCompound : BSLinkset | |||
400 | } // DEBUG DEBUG | 400 | } // DEBUG DEBUG |
401 | else | 401 | else |
402 | { | 402 | { |
403 | centerOfMass = ComputeLinksetGeometricCenter(); | 403 | centerOfMass = ComputeLinksetCenterOfMass(); |
404 | centerDisplacement = centerOfMass - LinksetRoot.RawPosition; | 404 | // 'centerDisplacement' is the value to *add* to all the shape offsets |
405 | centerDisplacement = LinksetRoot.RawPosition - centerOfMass; | ||
405 | 406 | ||
406 | // Since we're displacing the center of the shape, we need to move the body in the world | 407 | // Since we're displacing the center of the shape, we need to move the body in the world |
407 | LinksetRoot.PositionDisplacement = centerDisplacement; | 408 | LinksetRoot.PositionDisplacement = centerDisplacement; |