aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorRobert Adams2013-01-21 15:55:54 -0800
committerRobert Adams2013-01-21 15:55:54 -0800
commit95c53ecae708c8f915e02c4f872c931efdd6c29a (patch)
treedf054dedfb362639ad11b54ddab79c81b372229f /OpenSim/Region/Framework/Scenes
parentBulletSim: remove unused MaxTaintsToProcessPerStep parameter (diff)
downloadopensim-SC_OLD-95c53ecae708c8f915e02c4f872c931efdd6c29a.zip
opensim-SC_OLD-95c53ecae708c8f915e02c4f872c931efdd6c29a.tar.gz
opensim-SC_OLD-95c53ecae708c8f915e02c4f872c931efdd6c29a.tar.bz2
opensim-SC_OLD-95c53ecae708c8f915e02c4f872c931efdd6c29a.tar.xz
Have SOP and LSL_Api call the proper GetCenterOfMass and GetGeometricCenter
routines on the physics engine. Won't make a difference for any existing scripts since ODE always returned Vector3.Zero.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 44e8fdf..e0ea344 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1952,6 +1952,16 @@ namespace OpenSim.Region.Framework.Scenes
1952 PhysicsActor pa = PhysActor; 1952 PhysicsActor pa = PhysActor;
1953 1953
1954 if (pa != null) 1954 if (pa != null)
1955 return new Vector3(pa.GeometricCenter.X, pa.GeometricCenter.Y, pa.GeometricCenter.Z);
1956 else
1957 return new Vector3(0, 0, 0);
1958 }
1959
1960 public Vector3 GetCenterOfMass()
1961 {
1962 PhysicsActor pa = PhysActor;
1963
1964 if (pa != null)
1955 return new Vector3(pa.CenterOfMass.X, pa.CenterOfMass.Y, pa.CenterOfMass.Z); 1965 return new Vector3(pa.CenterOfMass.X, pa.CenterOfMass.Y, pa.CenterOfMass.Z);
1956 else 1966 else
1957 return new Vector3(0, 0, 0); 1967 return new Vector3(0, 0, 0);