Fix linking link sets to rotated prims.

avinationmerge
Melanie 2010-12-26 20:42:47 +01:00
parent 8186bf2525
commit f2dd324bc8
1 changed files with 4 additions and 3 deletions

View File

@ -2584,7 +2584,8 @@ namespace OpenSim.Region.Framework.Scenes
axPos *= parentRot;
part.OffsetPosition = axPos;
part.GroupPosition = oldGroupPosition + part.OffsetPosition;
Vector3 newPos = oldGroupPosition + part.OffsetPosition;
part.GroupPosition = newPos;
part.OffsetPosition = Vector3.Zero;
part.RotationOffset = worldRot;
@ -2595,7 +2596,7 @@ namespace OpenSim.Region.Framework.Scenes
part.LinkNum = linkNum;
part.OffsetPosition = part.GroupPosition - AbsolutePosition;
part.OffsetPosition = newPos - AbsolutePosition;
Quaternion rootRotation = m_rootPart.RotationOffset;
@ -2605,7 +2606,7 @@ namespace OpenSim.Region.Framework.Scenes
parentRot = m_rootPart.RotationOffset;
oldRot = part.RotationOffset;
Quaternion newRot = Quaternion.Inverse(parentRot) * oldRot;
Quaternion newRot = Quaternion.Inverse(parentRot) * worldRot;
part.RotationOffset = newRot;
}