diff options
author | Robert Adams | 2013-01-23 09:09:17 -0800 |
---|---|---|
committer | Robert Adams | 2013-01-23 14:25:18 -0800 |
commit | a5e9c665f08059fef16d0b0875697cb08e16351e (patch) | |
tree | 61d11e9cb950fb7fe780dc96466bc8ba426937b9 /OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs | |
parent | BulletSim: working on COM (diff) | |
download | opensim-SC_OLD-a5e9c665f08059fef16d0b0875697cb08e16351e.zip opensim-SC_OLD-a5e9c665f08059fef16d0b0875697cb08e16351e.tar.gz opensim-SC_OLD-a5e9c665f08059fef16d0b0875697cb08e16351e.tar.bz2 opensim-SC_OLD-a5e9c665f08059fef16d0b0875697cb08e16351e.tar.xz |
BulletSim: center-of-gravity linkset changes. Not working yet.
Conflicts:
OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs index d8e4028..2c8dd23 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs | |||
@@ -407,6 +407,9 @@ public sealed class BSLinksetCompound : BSLinkset | |||
407 | // 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 |
408 | LinksetRoot.PositionDisplacement = centerDisplacement; | 408 | LinksetRoot.PositionDisplacement = centerDisplacement; |
409 | 409 | ||
410 | // This causes the root prim position to be set properly based on the new PositionDisplacement | ||
411 | LinksetRoot.ForcePosition = LinksetRoot.RawPosition; | ||
412 | // Update the local transform for the root child shape so it is offset from the <0,0,0> which is COM | ||
410 | PhysicsScene.PE.UpdateChildTransform(LinksetRoot.PhysShape, 0, -centerDisplacement, OMV.Quaternion.Identity, false); | 413 | PhysicsScene.PE.UpdateChildTransform(LinksetRoot.PhysShape, 0, -centerDisplacement, OMV.Quaternion.Identity, false); |
411 | DetailLog("{0},BSLinksetCompound.RecomputeLinksetCompound,COM,com={1},rootPos={2},centerDisp={3}", | 414 | DetailLog("{0},BSLinksetCompound.RecomputeLinksetCompound,COM,com={1},rootPos={2},centerDisp={3}", |
412 | LinksetRoot.LocalID, centerOfMass, LinksetRoot.RawPosition, centerDisplacement); | 415 | LinksetRoot.LocalID, centerOfMass, LinksetRoot.RawPosition, centerDisplacement); |
@@ -438,7 +441,7 @@ public sealed class BSLinksetCompound : BSLinkset | |||
438 | 441 | ||
439 | if (cPrim.PhysShape.isNativeShape) | 442 | if (cPrim.PhysShape.isNativeShape) |
440 | { | 443 | { |
441 | // A native shape is turning into a hull collision shape because native | 444 | // A native shape is turned into a hull collision shape because native |
442 | // shapes are not shared so we have to hullify it so it will be tracked | 445 | // shapes are not shared so we have to hullify it so it will be tracked |
443 | // and freed at the correct time. This also solves the scaling problem | 446 | // and freed at the correct time. This also solves the scaling problem |
444 | // (native shapes scaled but hull/meshes are assumed to not be). | 447 | // (native shapes scaled but hull/meshes are assumed to not be). |