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]
parent
76379a415b
commit
16f75978ce
|
@ -443,7 +443,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
axPos = parentRot.Inverse() * axPos;
|
axPos = parentRot.Inverse() * axPos;
|
||||||
linkPart.OffsetPosition = new LLVector3(axPos.x, axPos.y, axPos.z);
|
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 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.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w);
|
||||||
linkPart.ParentID = this.m_rootPart.LocalID;
|
linkPart.ParentID = this.m_rootPart.LocalID;
|
||||||
this.m_parts.Add(linkPart.UUID, linkPart);
|
this.m_parts.Add(linkPart.UUID, linkPart);
|
||||||
|
@ -464,6 +464,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
this.ScheduleGroupForFullUpdate();
|
this.ScheduleGroupForFullUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void LinkNonRootPart(SceneObjectPart part, Vector3 oldGroupPosition, Quaternion oldGroupRotation)
|
private void LinkNonRootPart(SceneObjectPart part, Vector3 oldGroupPosition, Quaternion oldGroupRotation)
|
||||||
{
|
{
|
||||||
part.SetParent(this);
|
part.SetParent(this);
|
||||||
|
|
Loading…
Reference in New Issue