aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
diff options
context:
space:
mode:
authorRobert Adams2013-01-23 08:28:36 -0800
committerRobert Adams2013-01-23 14:25:06 -0800
commitc1371ab786a699ce91693e6e575bb81144a79c57 (patch)
tree4ca77ded358520a3ca7f962a89cd544fc001f245 /OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
parentBulletSim: fix build break introduced by previous commit (diff)
downloadopensim-SC-c1371ab786a699ce91693e6e575bb81144a79c57.zip
opensim-SC-c1371ab786a699ce91693e6e575bb81144a79c57.tar.gz
opensim-SC-c1371ab786a699ce91693e6e575bb81144a79c57.tar.bz2
opensim-SC-c1371ab786a699ce91693e6e575bb81144a79c57.tar.xz
BulletSim: working on COM
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs7
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;