From ac6dcd35fb77f118fc6c3d72cb029591306c7e99 Mon Sep 17 00:00:00 2001 From: Vegaslon Date: Mon, 6 May 2013 21:19:48 -0400 Subject: [PATCH] Bulletsim: and the rotational friction. Signed-off-by: Robert Adams --- OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs index e93dbd7ace..c16b7d3e6a 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs @@ -1339,11 +1339,13 @@ namespace OpenSim.Region.Physics.BulletSPlugin // angularMotorContributionV.Y = 0f; // } + // Reduce any velocity by friction. + Vector3 frictionFactorW = ComputeFrictionFactor(m_angularFrictionTimescale, pTimestep); + angularMotorContributionV -= (currentAngularV * frictionFactorW); + VehicleRotationalVelocity += angularMotorContributionV * VehicleOrientation; - // Reduce any velocity by friction. - Vector3 frictionFactorW = ComputeFrictionFactor(m_angularFrictionTimescale, pTimestep) * VehicleOrientation; - VehicleRotationalVelocity -= (VehicleRotationalVelocity * frictionFactorW); + VDetailLog("{0}, MoveAngular,angularTurning,angContribV={1}", ControllingPrim.LocalID, angularMotorContributionV); }