SOG bug fix in group rotations updates
parent
dd745f60c2
commit
df9935273f
|
@ -2667,11 +2667,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
Vector3 axPos = linkPart.OffsetPosition;
|
Vector3 axPos = linkPart.OffsetPosition;
|
||||||
Quaternion parentRot = m_rootPart.RotationOffset;
|
Quaternion parentRot = m_rootPart.RotationOffset;
|
||||||
axPos *= Quaternion.Inverse(parentRot);
|
axPos *= Quaternion.Conjugate(parentRot);
|
||||||
linkPart.OffsetPosition = axPos;
|
linkPart.OffsetPosition = axPos;
|
||||||
|
|
||||||
Quaternion oldRot = linkPart.RotationOffset;
|
Quaternion oldRot = linkPart.RotationOffset;
|
||||||
Quaternion newRot = Quaternion.Inverse(parentRot) * oldRot;
|
Quaternion newRot = Quaternion.Conjugate(parentRot) * oldRot;
|
||||||
linkPart.RotationOffset = newRot;
|
linkPart.RotationOffset = newRot;
|
||||||
|
|
||||||
// linkPart.ParentID = m_rootPart.LocalId; done above
|
// linkPart.ParentID = m_rootPart.LocalId; done above
|
||||||
|
@ -2923,12 +2923,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Quaternion rootRotation = m_rootPart.RotationOffset;
|
Quaternion rootRotation = m_rootPart.RotationOffset;
|
||||||
|
|
||||||
Vector3 pos = part.OffsetPosition;
|
Vector3 pos = part.OffsetPosition;
|
||||||
pos *= Quaternion.Inverse(rootRotation);
|
pos *= Quaternion.Conjugate(rootRotation);
|
||||||
part.OffsetPosition = pos;
|
part.OffsetPosition = pos;
|
||||||
|
|
||||||
parentRot = m_rootPart.RotationOffset;
|
parentRot = m_rootPart.RotationOffset;
|
||||||
oldRot = part.RotationOffset;
|
oldRot = part.RotationOffset;
|
||||||
Quaternion newRot = Quaternion.Inverse(parentRot) * worldRot;
|
Quaternion newRot = Quaternion.Conjugate(parentRot) * worldRot;
|
||||||
part.RotationOffset = newRot;
|
part.RotationOffset = newRot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3526,6 +3526,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <param name="rot"></param>
|
/// <param name="rot"></param>
|
||||||
public void UpdateGroupRotationR(Quaternion rot)
|
public void UpdateGroupRotationR(Quaternion rot)
|
||||||
{
|
{
|
||||||
|
m_rootPart.UpdateRotation(rot);
|
||||||
|
|
||||||
PhysicsActor actor = m_rootPart.PhysActor;
|
PhysicsActor actor = m_rootPart.PhysActor;
|
||||||
if (actor != null)
|
if (actor != null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue