From 2b6d22691141b8cdccfc44d25890f99e1f72b3dd Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sat, 2 Feb 2013 13:33:44 -0800 Subject: BulletSim: correct angular vertical attraction to properly correct an upside down vehicle. --- OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs index 8ecf2ff..b51e9fd 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs @@ -1326,7 +1326,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin // If verticalError.Z is negative, the vehicle is upside down. Add additional push. if (verticalError.Z < 0f) { - vertContributionV.X += PIOverFour; + vertContributionV.X += Math.Sign(vertContributionV.X) * PIOverFour; // vertContribution.Y -= PIOverFour; } -- cgit v1.1