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]

afrisby
MW 2007-08-21 16:46:10 +00:00
parent 76379a415b
commit 16f75978ce
1 changed files with 2 additions and 1 deletions

View File

@ -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);