aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-05-23 01:34:02 +0100
committerJustin Clark-Casey (justincc)2014-05-23 01:34:02 +0100
commitfbed2455965283e7cec92f8cceb89a333e1dca14 (patch)
treef0bf3f404e4537427cc2257bfa5ba8ddfcccdc90 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentIf a script calls llSetCameraAtOffset() or llSetCameraEyeOffset() on a child ... (diff)
downloadopensim-SC_OLD-fbed2455965283e7cec92f8cceb89a333e1dca14.zip
opensim-SC_OLD-fbed2455965283e7cec92f8cceb89a333e1dca14.tar.gz
opensim-SC_OLD-fbed2455965283e7cec92f8cceb89a333e1dca14.tar.bz2
opensim-SC_OLD-fbed2455965283e7cec92f8cceb89a333e1dca14.tar.xz
Compensate camera-at and camera-eye for child prim rotation when sitting on child prim with camera-eye set
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 026b0b6..eaac71d 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2764,7 +2764,19 @@ namespace OpenSim.Region.Framework.Scenes
2764 cameraEyeOffset = part.ParentGroup.RootPart.GetCameraEyeOffset(); 2764 cameraEyeOffset = part.ParentGroup.RootPart.GetCameraEyeOffset();
2765 2765
2766 if (cameraEyeOffset != Vector3.Zero || cameraAtOffset != Vector3.Zero) 2766 if (cameraEyeOffset != Vector3.Zero || cameraAtOffset != Vector3.Zero)
2767 {
2768 if (!part.IsRoot)
2769 {
2770 cameraEyeOffset = cameraEyeOffset * part.RotationOffset;
2771 cameraAtOffset = part.OffsetPosition;
2772 }
2773
2767 cameraEyeOffset += part.OffsetPosition; 2774 cameraEyeOffset += part.OffsetPosition;
2775 }
2776
2777// m_log.DebugFormat(
2778// "[SCENE PRESENCE]: Using cameraAtOffset {0}, cameraEyeOffset {1} for sit on {2} by {3} in {4}",
2779// cameraAtOffset, cameraEyeOffset, part.Name, Name, Scene.Name);
2768 2780
2769 forceMouselook = part.GetForceMouselook(); 2781 forceMouselook = part.GetForceMouselook();
2770 2782