diff options
Diffstat (limited to '')
-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). |