diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index cf03d7c..66b42a1 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2960,6 +2960,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
2960 | //ParentGroup.RootPart.m_groupPosition = newpos; | 2960 | //ParentGroup.RootPart.m_groupPosition = newpos; |
2961 | } | 2961 | } |
2962 | 2962 | ||
2963 | if (pa != null && ParentID != 0 && ParentGroup != null) | ||
2964 | { | ||
2965 | // Special case where a child object is requesting property updates. | ||
2966 | // This happens when linksets are modified to use flexible links rather than | ||
2967 | // the default links. | ||
2968 | // The simulator code presumes that child parts are only modified by scripts | ||
2969 | // so the logic for changing position/rotation/etc does not take into | ||
2970 | // account the physical object actually moving. | ||
2971 | // This code updates the offset position and rotation of the child and then | ||
2972 | // lets the update code push the update to the viewer. | ||
2973 | // Since physics engines do not normally generate this event for linkset children, | ||
2974 | // this code will not be active unless you have a specially configured | ||
2975 | // physics engine. | ||
2976 | Quaternion invRootRotation = Quaternion.Normalize(Quaternion.Inverse(ParentGroup.RootPart.RotationOffset)); | ||
2977 | m_offsetPosition = pa.Position - m_groupPosition; | ||
2978 | RotationOffset = pa.Orientation * invRootRotation; | ||
2979 | // m_log.DebugFormat("{0} PhysicsRequestingTerseUpdate child: pos={1}, rot={2}, offPos={3}, offRot={4}", | ||
2980 | // "[SCENE OBJECT PART]", pa.Position, pa.Orientation, m_offsetPosition, RotationOffset); | ||
2981 | } | ||
2982 | |||
2963 | ScheduleTerseUpdate(); | 2983 | ScheduleTerseUpdate(); |
2964 | } | 2984 | } |
2965 | 2985 | ||