From 97ba3c93467e865d0434c0b2f0f775efdc0c354a Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 5 Jan 2012 08:11:52 +0000 Subject: Small fix to GetWorldPosition to get closer to Avination sit behavior --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index aea47e6..51d3586 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1960,19 +1960,13 @@ namespace OpenSim.Region.Framework.Scenes public Vector3 GetWorldPosition() { Quaternion parentRot = ParentGroup.RootPart.RotationOffset; - Vector3 axPos = OffsetPosition; - axPos *= parentRot; Vector3 translationOffsetPosition = axPos; - -// m_log.DebugFormat("[SCENE OBJECT PART]: Found group pos {0} for part {1}", GroupPosition, Name); - - Vector3 worldPos = GroupPosition + translationOffsetPosition; - -// m_log.DebugFormat("[SCENE OBJECT PART]: Found world pos {0} for part {1}", worldPos, Name); - - return worldPos; + if(_parentID == 0) + return GroupPosition; + else + return ParentGroup.AbsolutePosition + translationOffsetPosition; } /// -- cgit v1.1