From 573fb3a6090e4171bbccb63a223c35e82c380369 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 25 Aug 2007 14:12:40 +0000 Subject: Hopefully fixed the bugs in primitives rotation editing --- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 8 +++++--- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Environment') 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 /// private void UpdateRootRotation(LLQuaternion rot) { + Axiom.Math.Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z); + 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); + this.m_rootPart.UpdateRotation(rot); if (m_rootPart.PhysActor != null) { m_rootPart.PhysActor.Orientation = new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z); } - Axiom.Math.Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z); - 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); foreach (SceneObjectPart prim in this.m_parts.Values) { @@ -916,7 +917,8 @@ namespace OpenSim.Region.Environment.Scenes Axiom.Math.Quaternion primsRot = new Quaternion(prim.RotationOffset.W, prim.RotationOffset.X, prim.RotationOffset.Y, prim.RotationOffset.Z); Axiom.Math.Quaternion newRot = oldParentRot * primsRot; newRot = axRot.Inverse() * newRot; - prim.RotationOffset = new LLQuaternion(newRot.w, newRot.x, newRot.y, newRot.z); + prim.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w); + prim.ScheduleTerseUpdate(); } } this.m_rootPart.ScheduleTerseUpdate(); diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index e32c196..b77da3a 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -244,7 +244,8 @@ namespace OpenSim.Region.Environment.Scenes m_folderID = LLUUID.Random(); m_flags = 0; - m_flags |= LLObject.ObjectFlags.ObjectModify | + m_flags |= LLObject.ObjectFlags.Physics | + LLObject.ObjectFlags.ObjectModify | LLObject.ObjectFlags.ObjectCopy | LLObject.ObjectFlags.ObjectYouOwner | LLObject.ObjectFlags.Touch | -- cgit v1.1