From 16f75978ceded5c8191a27ad583f024eda5d2de5 Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 21 Aug 2007 16:46:10 +0000 Subject: [PATCH] Think linking prims should now work correctly (if its not then please someone let me know) and the rotations are kept. [Now just need to fix the editing (rotation and position) of individual prims of a group] --- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 1b7ff23dc3..03ad8c5b76 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -443,7 +443,7 @@ namespace OpenSim.Region.Environment.Scenes axPos = parentRot.Inverse() * axPos; linkPart.OffsetPosition = new LLVector3(axPos.x, axPos.y, axPos.z); Quaternion oldRot = new Quaternion(linkPart.RotationOffset.W, linkPart.RotationOffset.X, linkPart.RotationOffset.Y, linkPart.RotationOffset.Z); - Quaternion newRot = parentRot * oldRot; + Quaternion newRot = parentRot.Inverse() * oldRot; linkPart.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w); linkPart.ParentID = this.m_rootPart.LocalID; this.m_parts.Add(linkPart.UUID, linkPart); @@ -464,6 +464,7 @@ namespace OpenSim.Region.Environment.Scenes this.ScheduleGroupForFullUpdate(); } + private void LinkNonRootPart(SceneObjectPart part, Vector3 oldGroupPosition, Quaternion oldGroupRotation) { part.SetParent(this);