Merge branch 'master' into careminster

avinationmerge
Melanie 2013-05-07 00:30:59 +01:00
commit 54d0cd85ad
1 changed files with 6 additions and 6 deletions

View File

@ -1042,12 +1042,12 @@ namespace OpenSim.Region.Physics.BulletSPlugin
VehicleVelocity += linearMotorVelocityW; VehicleVelocity += linearMotorVelocityW;
// Friction reduces vehicle motion // Friction reduces vehicle motion
Vector3 frictionFactor = ComputeFrictionFactor(m_linearFrictionTimescale, pTimestep); Vector3 frictionFactorW = ComputeFrictionFactor(m_linearFrictionTimescale, pTimestep) * VehicleOrientation;
VehicleVelocity -= (VehicleVelocity * frictionFactor); VehicleVelocity -= (VehicleVelocity * frictionFactorW);
VDetailLog("{0}, MoveLinear,velocity,origVelW={1},velV={2},correctV={3},correctW={4},newVelW={5},fricFact={6}", VDetailLog("{0}, MoveLinear,velocity,origVelW={1},velV={2},correctV={3},correctW={4},newVelW={5},fricFact={6}",
ControllingPrim.LocalID, origVelW, currentVelV, linearMotorCorrectionV, ControllingPrim.LocalID, origVelW, currentVelV, linearMotorCorrectionV,
linearMotorVelocityW, VehicleVelocity, frictionFactor); linearMotorVelocityW, VehicleVelocity, frictionFactorW);
} }
public void ComputeLinearTerrainHeightCorrection(float pTimestep) public void ComputeLinearTerrainHeightCorrection(float pTimestep)
@ -1340,10 +1340,10 @@ namespace OpenSim.Region.Physics.BulletSPlugin
VehicleRotationalVelocity += angularMotorContributionV * VehicleOrientation; VehicleRotationalVelocity += angularMotorContributionV * VehicleOrientation;
// Reduce any velocity by friction. // Reduce any velocity by friction.
Vector3 frictionFactor = ComputeFrictionFactor(m_angularFrictionTimescale, pTimestep); Vector3 frictionFactorW = ComputeFrictionFactor(m_angularFrictionTimescale, pTimestep) * VehicleOrientation;
VehicleRotationalVelocity -= (VehicleRotationalVelocity * frictionFactor); VehicleRotationalVelocity -= (VehicleRotationalVelocity * frictionFactorW);
VDetailLog("{0}, MoveAngular,angularTurning,angularMotorContrib={1}", ControllingPrim.LocalID, angularMotorContributionV); VDetailLog("{0}, MoveAngular,angularTurning,angContribV={1}", ControllingPrim.LocalID, angularMotorContributionV);
} }
// From http://wiki.secondlife.com/wiki/Linden_Vehicle_Tutorial: // From http://wiki.secondlife.com/wiki/Linden_Vehicle_Tutorial: