aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2016-12-30 19:12:56 +0000
committerUbitUmarov2016-12-30 19:13:18 +0000
commitda08e2e5f5be597919b4844675af944e4461711f (patch)
tree50fe09b1f1b539cc40bb024221703b0c274684dc /OpenSim
parentFake accepting materials (Type == -2) on FSAssets. (diff)
downloadopensim-SC-da08e2e5f5be597919b4844675af944e4461711f.zip
opensim-SC-da08e2e5f5be597919b4844675af944e4461711f.tar.gz
opensim-SC-da08e2e5f5be597919b4844675af944e4461711f.tar.bz2
opensim-SC-da08e2e5f5be597919b4844675af944e4461711f.tar.xz
mantis 8106: improve avatar walk in mouselook
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs14
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 5082b9d..f906d9f 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3674,12 +3674,18 @@ namespace OpenSim.Region.Framework.Scenes
3674 // vec, Rotation, thisAddSpeedModifier, Name); 3674 // vec, Rotation, thisAddSpeedModifier, Name);
3675 3675
3676 // rotate from avatar coord space to world 3676 // rotate from avatar coord space to world
3677 // for now all controls assume this is only a rotation around Z 3677 Quaternion rot = Rotation;
3678 // if not all checks below need to be done before this rotation 3678 if (!Flying && PresenceType != PresenceType.Npc)
3679 Vector3 direc = vec * Rotation; 3679 {
3680 // force rotation to be around Z only, if not flying
3681 // needed for mouselook
3682 rot.X = 0;
3683 rot.Y = 0;
3684 }
3685
3686 Vector3 direc = vec * rot;
3680 direc.Normalize(); 3687 direc.Normalize();
3681 3688
3682 // mouse look situation ?
3683 if ((vec.Z == 0f) && !Flying) 3689 if ((vec.Z == 0f) && !Flying)
3684 direc.Z = 0f; // Prevent camera WASD up. 3690 direc.Z = 0f; // Prevent camera WASD up.
3685 3691