aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs37
1 files changed, 27 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index e7462ba..5c76964 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2705,12 +2705,20 @@ namespace OpenSim.Region.Framework.Scenes
2705 { 2705 {
2706 sitOrientation = part.RotationOffset * sitOrientation; 2706 sitOrientation = part.RotationOffset * sitOrientation;
2707 offset = offset * part.RotationOffset; 2707 offset = offset * part.RotationOffset;
2708 cameraAtOffset = cameraAtOffset * part.RotationOffset;
2709 cameraEyeOffset = cameraEyeOffset * part.RotationOffset;
2710
2711 offset += part.OffsetPosition; 2708 offset += part.OffsetPosition;
2712 cameraAtOffset += part.OffsetPosition; 2709
2713 cameraEyeOffset += part.OffsetPosition; 2710 if (CameraAtAxis == Vector3.Zero && cameraEyeOffset == Vector3.Zero)
2711 {
2712 CameraAtAxis = part.ParentGroup.RootPart.GetCameraAtOffset();
2713 cameraEyeOffset = part.ParentGroup.RootPart.GetCameraEyeOffset();
2714 }
2715 else
2716 {
2717 cameraAtOffset = cameraAtOffset * part.RotationOffset;
2718 cameraAtOffset += part.OffsetPosition;
2719 cameraEyeOffset = cameraEyeOffset * part.RotationOffset;
2720 cameraEyeOffset += part.OffsetPosition;
2721 }
2714 } 2722 }
2715 2723
2716 2724
@@ -2845,12 +2853,21 @@ namespace OpenSim.Region.Framework.Scenes
2845 { 2853 {
2846 Orientation = part.RotationOffset * Orientation; 2854 Orientation = part.RotationOffset * Orientation;
2847 offset = offset * part.RotationOffset; 2855 offset = offset * part.RotationOffset;
2848 cameraAtOffset = cameraAtOffset * part.RotationOffset;
2849 cameraEyeOffset = cameraEyeOffset * part.RotationOffset;
2850
2851 offset += part.OffsetPosition; 2856 offset += part.OffsetPosition;
2852 cameraAtOffset += part.OffsetPosition; 2857
2853 cameraEyeOffset += part.OffsetPosition; 2858 if (CameraAtAxis == Vector3.Zero && cameraEyeOffset == Vector3.Zero)
2859 {
2860 CameraAtAxis = part.ParentGroup.RootPart.GetCameraAtOffset();
2861 cameraEyeOffset = part.ParentGroup.RootPart.GetCameraEyeOffset();
2862 }
2863 else
2864 {
2865 cameraAtOffset = cameraAtOffset * part.RotationOffset;
2866 cameraAtOffset += part.OffsetPosition;
2867 cameraEyeOffset = cameraEyeOffset * part.RotationOffset;
2868 cameraEyeOffset += part.OffsetPosition;
2869 }
2870
2854 } 2871 }
2855 2872
2856 m_pos = offset; 2873 m_pos = offset;