diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index b0f2015..f870b58 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2667,11 +2667,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2667 | 2667 | ||
2668 | Vector3 axPos = linkPart.OffsetPosition; | 2668 | Vector3 axPos = linkPart.OffsetPosition; |
2669 | Quaternion parentRot = m_rootPart.RotationOffset; | 2669 | Quaternion parentRot = m_rootPart.RotationOffset; |
2670 | axPos *= Quaternion.Inverse(parentRot); | 2670 | axPos *= Quaternion.Conjugate(parentRot); |
2671 | linkPart.OffsetPosition = axPos; | 2671 | linkPart.OffsetPosition = axPos; |
2672 | 2672 | ||
2673 | Quaternion oldRot = linkPart.RotationOffset; | 2673 | Quaternion oldRot = linkPart.RotationOffset; |
2674 | Quaternion newRot = Quaternion.Inverse(parentRot) * oldRot; | 2674 | Quaternion newRot = Quaternion.Conjugate(parentRot) * oldRot; |
2675 | linkPart.RotationOffset = newRot; | 2675 | linkPart.RotationOffset = newRot; |
2676 | 2676 | ||
2677 | // linkPart.ParentID = m_rootPart.LocalId; done above | 2677 | // linkPart.ParentID = m_rootPart.LocalId; done above |
@@ -2923,12 +2923,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2923 | Quaternion rootRotation = m_rootPart.RotationOffset; | 2923 | Quaternion rootRotation = m_rootPart.RotationOffset; |
2924 | 2924 | ||
2925 | Vector3 pos = part.OffsetPosition; | 2925 | Vector3 pos = part.OffsetPosition; |
2926 | pos *= Quaternion.Inverse(rootRotation); | 2926 | pos *= Quaternion.Conjugate(rootRotation); |
2927 | part.OffsetPosition = pos; | 2927 | part.OffsetPosition = pos; |
2928 | 2928 | ||
2929 | parentRot = m_rootPart.RotationOffset; | 2929 | parentRot = m_rootPart.RotationOffset; |
2930 | oldRot = part.RotationOffset; | 2930 | oldRot = part.RotationOffset; |
2931 | Quaternion newRot = Quaternion.Inverse(parentRot) * worldRot; | 2931 | Quaternion newRot = Quaternion.Conjugate(parentRot) * worldRot; |
2932 | part.RotationOffset = newRot; | 2932 | part.RotationOffset = newRot; |
2933 | } | 2933 | } |
2934 | 2934 | ||
@@ -3526,6 +3526,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3526 | /// <param name="rot"></param> | 3526 | /// <param name="rot"></param> |
3527 | public void UpdateGroupRotationR(Quaternion rot) | 3527 | public void UpdateGroupRotationR(Quaternion rot) |
3528 | { | 3528 | { |
3529 | m_rootPart.UpdateRotation(rot); | ||
3530 | |||
3529 | PhysicsActor actor = m_rootPart.PhysActor; | 3531 | PhysicsActor actor = m_rootPart.PhysActor; |
3530 | if (actor != null) | 3532 | if (actor != null) |
3531 | { | 3533 | { |