aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-05-05 11:03:38 +0100
committerUbitUmarov2012-05-05 11:03:38 +0100
commit2ab9588c9ad4c3a54d90550f438c9abb0e12a0e2 (patch)
tree65636bf079c178ef4d5bf1f99f29df0b26f64f35 /OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
parentSOG: tell physics about when we want a force or a impulse. (sorry add to cha... (diff)
downloadopensim-SC_OLD-2ab9588c9ad4c3a54d90550f438c9abb0e12a0e2.zip
opensim-SC_OLD-2ab9588c9ad4c3a54d90550f438c9abb0e12a0e2.tar.gz
opensim-SC_OLD-2ab9588c9ad4c3a54d90550f438c9abb0e12a0e2.tar.bz2
opensim-SC_OLD-2ab9588c9ad4c3a54d90550f438c9abb0e12a0e2.tar.xz
UbitODE: reduced the diference btw dinamic and static friction, making dinamic larger more identical to static.
Diffstat (limited to 'OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs34
1 files changed, 17 insertions, 17 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
index 84195d3..ca83dd7 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
@@ -178,7 +178,7 @@ namespace OpenSim.Region.Physics.OdePlugin
178 const float minERP = 0.1f; 178 const float minERP = 0.1f;
179 const float comumContactCFM = 0.0001f; 179 const float comumContactCFM = 0.0001f;
180 180
181 float frictionMovementMult = 0.3f; 181 float frictionMovementMult = 0.8f;
182 182
183 float TerrainBounce = 0.1f; 183 float TerrainBounce = 0.1f;
184 float TerrainFriction = 0.3f; 184 float TerrainFriction = 0.3f;
@@ -820,18 +820,18 @@ namespace OpenSim.Region.Physics.OdePlugin
820 switch (p2.PhysicsActorType) 820 switch (p2.PhysicsActorType)
821 { 821 {
822 case (int)ActorTypes.Agent: 822 case (int)ActorTypes.Agent:
823// p1.getContactData(ref contactdata1); 823 // p1.getContactData(ref contactdata1);
824// p2.getContactData(ref contactdata2); 824 // p2.getContactData(ref contactdata2);
825 825
826 bounce = 0; 826 bounce = 0;
827 mu = 0; 827 mu = 0;
828 cfm = 0.0001f; 828 cfm = 0.0001f;
829/* 829 /*
830 mu = (float)Math.Sqrt(contactdata1.mu * contactdata2.mu); 830 mu = (float)Math.Sqrt(contactdata1.mu * contactdata2.mu);
831 831
832 if ((Math.Abs(p2.Velocity.X - p1.Velocity.X) > 0.1f || Math.Abs(p2.Velocity.Y - p1.Velocity.Y) > 0.1f)) 832 if ((Math.Abs(p2.Velocity.X - p1.Velocity.X) > 0.1f || Math.Abs(p2.Velocity.Y - p1.Velocity.Y) > 0.1f))
833 mu *= frictionMovementMult; 833 mu *= frictionMovementMult;
834*/ 834 */
835 dop2foot = true; 835 dop2foot = true;
836 if (p1.Velocity.LengthSquared() > 0.0f) 836 if (p1.Velocity.LengthSquared() > 0.0f)
837 p1.CollidingObj = true; 837 p1.CollidingObj = true;
@@ -850,14 +850,14 @@ namespace OpenSim.Region.Physics.OdePlugin
850 cfm = p1.Mass; 850 cfm = p1.Mass;
851 if (cfm > p2.Mass) 851 if (cfm > p2.Mass)
852 cfm = p2.Mass; 852 cfm = p2.Mass;
853 dscale = 10 / cfm; 853 dscale = 10 / cfm;
854 dscale = (float)Math.Sqrt(dscale); 854 dscale = (float)Math.Sqrt(dscale);
855 if (dscale > 1.0f) 855 if (dscale > 1.0f)
856 dscale = 1.0f; 856 dscale = 1.0f;
857 erpscale = cfm * 0.01f; 857 erpscale = cfm * 0.01f;
858 cfm = 0.0001f / cfm; 858 cfm = 0.0001f / cfm;
859 if (cfm > 0.01f) 859 if (cfm > 0.01f)
860 cfm = 0.01f; 860 cfm = 0.01f;
861 861
862 if ((Math.Abs(p2.Velocity.X - p1.Velocity.X) > 0.1f || Math.Abs(p2.Velocity.Y - p1.Velocity.Y) > 0.1f)) 862 if ((Math.Abs(p2.Velocity.X - p1.Velocity.X) > 0.1f || Math.Abs(p2.Velocity.Y - p1.Velocity.Y) > 0.1f))
863 mu *= frictionMovementMult; 863 mu *= frictionMovementMult;
@@ -898,7 +898,7 @@ namespace OpenSim.Region.Physics.OdePlugin
898 } 898 }
899 } 899 }
900 else 900 else
901 ignore=true; 901 ignore = true;
902 break; 902 break;
903 } 903 }
904 break; 904 break;