Small fix to GetWorldPosition to get closer to Avination sit behavior
parent
e78a3913e0
commit
97ba3c9346
|
@ -1960,19 +1960,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public Vector3 GetWorldPosition()
|
public Vector3 GetWorldPosition()
|
||||||
{
|
{
|
||||||
Quaternion parentRot = ParentGroup.RootPart.RotationOffset;
|
Quaternion parentRot = ParentGroup.RootPart.RotationOffset;
|
||||||
|
|
||||||
Vector3 axPos = OffsetPosition;
|
Vector3 axPos = OffsetPosition;
|
||||||
|
|
||||||
axPos *= parentRot;
|
axPos *= parentRot;
|
||||||
Vector3 translationOffsetPosition = axPos;
|
Vector3 translationOffsetPosition = axPos;
|
||||||
|
if(_parentID == 0)
|
||||||
// m_log.DebugFormat("[SCENE OBJECT PART]: Found group pos {0} for part {1}", GroupPosition, Name);
|
return GroupPosition;
|
||||||
|
else
|
||||||
Vector3 worldPos = GroupPosition + translationOffsetPosition;
|
return ParentGroup.AbsolutePosition + translationOffsetPosition;
|
||||||
|
|
||||||
// m_log.DebugFormat("[SCENE OBJECT PART]: Found world pos {0} for part {1}", worldPos, Name);
|
|
||||||
|
|
||||||
return worldPos;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue