diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 66fc53c..cbb50d7 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -543,7 +543,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
543 | bool isPhantom = ((ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) != 0); | 543 | bool isPhantom = ((ObjectFlags & (uint)LLObject.ObjectFlags.Phantom) != 0); |
544 | 544 | ||
545 | bool usePhysics = isPhysical && !isPhantom; | 545 | bool usePhysics = isPhysical && !isPhantom; |
546 | 546 | ||
547 | if (usePhysics) | 547 | if (usePhysics) |
548 | { | 548 | { |
549 | PhysActor = m_parentGroup.m_scene.PhysicsScene.AddPrimShape( | 549 | PhysActor = m_parentGroup.m_scene.PhysicsScene.AddPrimShape( |
@@ -1239,6 +1239,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
1239 | } | 1239 | } |
1240 | } | 1240 | } |
1241 | 1241 | ||
1242 | public LLVector3 GetGeometricCenter() | ||
1243 | { | ||
1244 | if (PhysActor != null) | ||
1245 | { | ||
1246 | return new LLVector3(PhysActor.CenterOfMass.X,PhysActor.CenterOfMass.Y,PhysActor.CenterOfMass.Z); | ||
1247 | } | ||
1248 | else | ||
1249 | { | ||
1250 | return new LLVector3(0, 0, 0); | ||
1251 | } | ||
1252 | } | ||
1253 | |||
1242 | #endregion | 1254 | #endregion |
1243 | 1255 | ||
1244 | #region Texture | 1256 | #region Texture |