aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-01-15 00:24:51 +0000
committerJustin Clark-Casey (justincc)2013-01-15 00:24:51 +0000
commitc846cefda97bd59b7707147d7ae1a520c9121127 (patch)
treeee23e4b451087874a8149348e010a905817121f7 /OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
parentrefactor: Simplify ScriptInstance by retaining reference to SceneObjectPart i... (diff)
parentBulletSim: fix not moving physical objects below terrain to over terrain. (diff)
downloadopensim-SC_OLD-c846cefda97bd59b7707147d7ae1a520c9121127.zip
opensim-SC_OLD-c846cefda97bd59b7707147d7ae1a520c9121127.tar.gz
opensim-SC_OLD-c846cefda97bd59b7707147d7ae1a520c9121127.tar.bz2
opensim-SC_OLD-c846cefda97bd59b7707147d7ae1a520c9121127.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs4
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 }