diff options
author | MW | 2007-08-25 14:12:40 +0000 |
---|---|---|
committer | MW | 2007-08-25 14:12:40 +0000 |
commit | 573fb3a6090e4171bbccb63a223c35e82c380369 (patch) | |
tree | 67b4d431fac6dbde89a5a3cc61f469db4d6c4062 /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |
parent | updated to include saving of object flags. (diff) | |
download | opensim-SC-573fb3a6090e4171bbccb63a223c35e82c380369.zip opensim-SC-573fb3a6090e4171bbccb63a223c35e82c380369.tar.gz opensim-SC-573fb3a6090e4171bbccb63a223c35e82c380369.tar.bz2 opensim-SC-573fb3a6090e4171bbccb63a223c35e82c380369.tar.xz |
Hopefully fixed the bugs in primitives rotation editing
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 8 |
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(); |