diff options
author | UbitUmarov | 2014-07-23 23:09:13 +0100 |
---|---|---|
committer | UbitUmarov | 2014-07-23 23:09:13 +0100 |
commit | 8808549669002c42c62c6ed602f7753571346d56 (patch) | |
tree | 007b07bd793b9bedd9bf76ab6e5a0a1722c5ca38 /OpenSim/Region | |
parent | change last commit setting intransit without messing flight (diff) | |
download | opensim-SC-8808549669002c42c62c6ed602f7753571346d56.zip opensim-SC-8808549669002c42c62c6ed602f7753571346d56.tar.gz opensim-SC-8808549669002c42c62c6ed602f7753571346d56.tar.bz2 opensim-SC-8808549669002c42c62c6ed602f7753571346d56.tar.xz |
on sit use root prim camera at and eye if child as neither
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 37 |
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; |