aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index aa33d03..b3e3fe3 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -897,13 +897,14 @@ namespace OpenSim.Region.Environment.Scenes
897 /// <param name="rot"></param> 897 /// <param name="rot"></param>
898 private void UpdateRootRotation(LLQuaternion rot) 898 private void UpdateRootRotation(LLQuaternion rot)
899 { 899 {
900 Axiom.Math.Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z);
901 Axiom.Math.Quaternion oldParentRot = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z);
902
900 this.m_rootPart.UpdateRotation(rot); 903 this.m_rootPart.UpdateRotation(rot);
901 if (m_rootPart.PhysActor != null) 904 if (m_rootPart.PhysActor != null)
902 { 905 {
903 m_rootPart.PhysActor.Orientation = new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z); 906 m_rootPart.PhysActor.Orientation = new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z);
904 } 907 }
905 Axiom.Math.Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z);
906 Axiom.Math.Quaternion oldParentRot = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z);
907 908
908 foreach (SceneObjectPart prim in this.m_parts.Values) 909 foreach (SceneObjectPart prim in this.m_parts.Values)
909 { 910 {
@@ -916,7 +917,8 @@ namespace OpenSim.Region.Environment.Scenes
916 Axiom.Math.Quaternion primsRot = new Quaternion(prim.RotationOffset.W, prim.RotationOffset.X, prim.RotationOffset.Y, prim.RotationOffset.Z); 917 Axiom.Math.Quaternion primsRot = new Quaternion(prim.RotationOffset.W, prim.RotationOffset.X, prim.RotationOffset.Y, prim.RotationOffset.Z);
917 Axiom.Math.Quaternion newRot = oldParentRot * primsRot; 918 Axiom.Math.Quaternion newRot = oldParentRot * primsRot;
918 newRot = axRot.Inverse() * newRot; 919 newRot = axRot.Inverse() * newRot;
919 prim.RotationOffset = new LLQuaternion(newRot.w, newRot.x, newRot.y, newRot.z); 920 prim.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w);
921 prim.ScheduleTerseUpdate();
920 } 922 }
921 } 923 }
922 this.m_rootPart.ScheduleTerseUpdate(); 924 this.m_rootPart.ScheduleTerseUpdate();