diff options
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs index 756faed..cbd160f 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs | |||
@@ -152,6 +152,7 @@ public abstract class BSLinkset | |||
152 | if (IsRoot(child)) | 152 | if (IsRoot(child)) |
153 | { | 153 | { |
154 | // Cannot remove the root from a linkset. | 154 | // Cannot remove the root from a linkset. |
155 | child.PositionDisplacement = OMV.Vector3.Zero; | ||
155 | return this; | 156 | return this; |
156 | } | 157 | } |
157 | RemoveChildFromLinkset(child); | 158 | RemoveChildFromLinkset(child); |
@@ -159,6 +160,7 @@ public abstract class BSLinkset | |||
159 | } | 160 | } |
160 | 161 | ||
161 | // The child is down to a linkset of just itself | 162 | // The child is down to a linkset of just itself |
163 | child.PositionDisplacement = OMV.Vector3.Zero; | ||
162 | return BSLinkset.Factory(PhysicsScene, child); | 164 | return BSLinkset.Factory(PhysicsScene, child); |
163 | } | 165 | } |
164 | 166 | ||
@@ -310,7 +312,7 @@ public abstract class BSLinkset | |||
310 | 312 | ||
311 | foreach (BSPhysObject bp in m_children) | 313 | foreach (BSPhysObject bp in m_children) |
312 | { | 314 | { |
313 | com += bp.Position * bp.RawMass; | 315 | com += bp.Position; |
314 | } | 316 | } |
315 | com /= (m_children.Count + 1); | 317 | com /= (m_children.Count + 1); |
316 | } | 318 | } |