From df9935273f59371061bda7e61dbdd38594e5c85a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 29 Apr 2012 00:41:51 +0100 Subject: SOG bug fix in group rotations updates --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') 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 Vector3 axPos = linkPart.OffsetPosition; Quaternion parentRot = m_rootPart.RotationOffset; - axPos *= Quaternion.Inverse(parentRot); + axPos *= Quaternion.Conjugate(parentRot); linkPart.OffsetPosition = axPos; Quaternion oldRot = linkPart.RotationOffset; - Quaternion newRot = Quaternion.Inverse(parentRot) * oldRot; + Quaternion newRot = Quaternion.Conjugate(parentRot) * oldRot; linkPart.RotationOffset = newRot; // linkPart.ParentID = m_rootPart.LocalId; done above @@ -2923,12 +2923,12 @@ namespace OpenSim.Region.Framework.Scenes Quaternion rootRotation = m_rootPart.RotationOffset; Vector3 pos = part.OffsetPosition; - pos *= Quaternion.Inverse(rootRotation); + pos *= Quaternion.Conjugate(rootRotation); part.OffsetPosition = pos; parentRot = m_rootPart.RotationOffset; oldRot = part.RotationOffset; - Quaternion newRot = Quaternion.Inverse(parentRot) * worldRot; + Quaternion newRot = Quaternion.Conjugate(parentRot) * worldRot; part.RotationOffset = newRot; } @@ -3526,6 +3526,8 @@ namespace OpenSim.Region.Framework.Scenes /// public void UpdateGroupRotationR(Quaternion rot) { + m_rootPart.UpdateRotation(rot); + PhysicsActor actor = m_rootPart.PhysActor; if (actor != null) { -- cgit v1.1