aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authordahlia2015-02-07 17:39:46 -0800
committerdahlia2015-02-07 17:39:46 -0800
commit12119a9d7dd16126c80284892412dc5253420fa4 (patch)
tree7d0509b2a9baae299266d9b1dbbafa34c3619cda /OpenSim/Region/Framework/Scenes
parentllLookAt(): reduce and clamp strengh to reduce probability of overshoot (diff)
downloadopensim-SC_OLD-12119a9d7dd16126c80284892412dc5253420fa4.zip
opensim-SC_OLD-12119a9d7dd16126c80284892412dc5253420fa4.tar.gz
opensim-SC_OLD-12119a9d7dd16126c80284892412dc5253420fa4.tar.bz2
opensim-SC_OLD-12119a9d7dd16126c80284892412dc5253420fa4.tar.xz
llLookAt() strength parameter should slow rotation as it is increased. Thanks Vegaslan for pointing this out.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 8d28915..af7121d 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -4882,7 +4882,7 @@ namespace OpenSim.Region.Framework.Scenes
4882 if (APIDTarget != Quaternion.Identity) 4882 if (APIDTarget != Quaternion.Identity)
4883 { 4883 {
4884 PhysicsActor pa = ParentGroup.RootPart.PhysActor; 4884 PhysicsActor pa = ParentGroup.RootPart.PhysActor;
4885 if (pa == null || !pa.IsPhysical) 4885 if (pa == null || !pa.IsPhysical || APIDStrength < 0.04)
4886 { 4886 {
4887 StopLookAt(); 4887 StopLookAt();
4888 return; 4888 return;
@@ -4911,7 +4911,7 @@ namespace OpenSim.Region.Framework.Scenes
4911 angle = 2.0f * (float)Math.PI - angle; 4911 angle = 2.0f * (float)Math.PI - angle;
4912 4912
4913 // clamp strength to avoid overshoot 4913 // clamp strength to avoid overshoot
4914 float strength = APIDStrength; 4914 float strength = 1.0f / APIDStrength;
4915 if (strength > 1.0) strength = 1.0f; 4915 if (strength > 1.0) strength = 1.0f;
4916 4916
4917 // set angular velocity to rotate to desired orientation 4917 // set angular velocity to rotate to desired orientation