From 3c37bc2851eb1c8c1ebd164dbf43fbeea427c2b8 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 10 May 2012 22:44:12 +0100 Subject: reduce avatars terminal velocity to less than 30m/s or colisions with basic boxs fail badly. (ode lib problem. chode just may support a bit higher velocity due to the use of tilt). --- OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs | 12 +++++++----- OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs index b884b62..43b4581 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs @@ -734,9 +734,9 @@ namespace OpenSim.Region.Physics.OdePlugin d.JointSetAMotorParam(Amotor, (int)d.JointParam.Vel2, 0); d.JointSetAMotorParam(Amotor, (int)d.JointParam.Vel3, 0); - d.JointSetAMotorParam(Amotor, (int)dParam.FMax, 5e6f); - d.JointSetAMotorParam(Amotor, (int)dParam.FMax2, 5e6f); - d.JointSetAMotorParam(Amotor, (int)dParam.FMax3, 5e6f); + d.JointSetAMotorParam(Amotor, (int)dParam.FMax, 5e8f); + d.JointSetAMotorParam(Amotor, (int)dParam.FMax2, 5e8f); + d.JointSetAMotorParam(Amotor, (int)dParam.FMax3, 5e8f); } /// @@ -784,6 +784,8 @@ namespace OpenSim.Region.Physics.OdePlugin // the Amotor still lets avatar rotation to drift during colisions // so force it back to identity + + d.Quaternion qtmp; qtmp.W = 1; qtmp.X = 0; @@ -1004,9 +1006,9 @@ namespace OpenSim.Region.Physics.OdePlugin } } - if (velLengthSquared > 2500.0f) // 50m/s apply breaks + if (velLengthSquared > 625.0f) // 25m/s apply breaks { - breakfactor = 0.16f * m_mass; + breakfactor = 0.31f * m_mass; vec.X -= breakfactor * vel.X; vec.Y -= breakfactor * vel.Y; vec.Z -= breakfactor * vel.Z; diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs index ca83dd7..e0de6cc 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs @@ -536,7 +536,8 @@ namespace OpenSim.Region.Physics.OdePlugin // This is in addition to the step size. // Essentially Steps * m_physicsiterations d.WorldSetQuickStepNumIterations(world, m_physicsiterations); - d.WorldSetContactMaxCorrectingVel(world, 100.0f); + + d.WorldSetContactMaxCorrectingVel(world, 50.0f); spacesPerMeter = 1 / metersInSpace; spaceGridMaxX = (int)(WorldExtents.X * spacesPerMeter); -- cgit v1.1