Fix linking link sets to rotated prims.
parent
8186bf2525
commit
f2dd324bc8
|
@ -2584,7 +2584,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
axPos *= parentRot;
|
axPos *= parentRot;
|
||||||
part.OffsetPosition = axPos;
|
part.OffsetPosition = axPos;
|
||||||
part.GroupPosition = oldGroupPosition + part.OffsetPosition;
|
Vector3 newPos = oldGroupPosition + part.OffsetPosition;
|
||||||
|
part.GroupPosition = newPos;
|
||||||
part.OffsetPosition = Vector3.Zero;
|
part.OffsetPosition = Vector3.Zero;
|
||||||
part.RotationOffset = worldRot;
|
part.RotationOffset = worldRot;
|
||||||
|
|
||||||
|
@ -2595,7 +2596,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
part.LinkNum = linkNum;
|
part.LinkNum = linkNum;
|
||||||
|
|
||||||
part.OffsetPosition = part.GroupPosition - AbsolutePosition;
|
part.OffsetPosition = newPos - AbsolutePosition;
|
||||||
|
|
||||||
Quaternion rootRotation = m_rootPart.RotationOffset;
|
Quaternion rootRotation = m_rootPart.RotationOffset;
|
||||||
|
|
||||||
|
@ -2605,7 +2606,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
parentRot = m_rootPart.RotationOffset;
|
parentRot = m_rootPart.RotationOffset;
|
||||||
oldRot = part.RotationOffset;
|
oldRot = part.RotationOffset;
|
||||||
Quaternion newRot = Quaternion.Inverse(parentRot) * oldRot;
|
Quaternion newRot = Quaternion.Inverse(parentRot) * worldRot;
|
||||||
part.RotationOffset = newRot;
|
part.RotationOffset = newRot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue