diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index ea0245c..8d28915 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -4910,10 +4910,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
4910 | if (angle > Math.PI) | 4910 | if (angle > Math.PI) |
4911 | angle = 2.0f * (float)Math.PI - angle; | 4911 | angle = 2.0f * (float)Math.PI - angle; |
4912 | 4912 | ||
4913 | // clamp strength to avoid overshoot | ||
4914 | float strength = APIDStrength; | ||
4915 | if (strength > 1.0) strength = 1.0f; | ||
4916 | |||
4913 | // set angular velocity to rotate to desired orientation | 4917 | // set angular velocity to rotate to desired orientation |
4914 | // with velocity proportional to strength and angle | 4918 | // with velocity proportional to strength and angle |
4915 | // the factor of 10 seems to make rotation speed closer to LL implementation | 4919 | AngularVelocity = axis * angle * strength * (float)Math.PI; |
4916 | AngularVelocity = axis * angle * APIDStrength * (float)Math.PI * 10.0f; | ||
4917 | 4920 | ||
4918 | // This ensures that we'll check this object on the next iteration | 4921 | // This ensures that we'll check this object on the next iteration |
4919 | ParentGroup.QueueForUpdateCheck(); | 4922 | ParentGroup.QueueForUpdateCheck(); |