diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs index 004ee7f..5602bd9 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs | |||
@@ -179,12 +179,13 @@ namespace OpenSim.Region.PhysicsModule.ubOde | |||
179 | 179 | ||
180 | // const d.ContactFlags comumContactFlags = d.ContactFlags.SoftERP | d.ContactFlags.SoftCFM |d.ContactFlags.Approx1 | d.ContactFlags.Bounce; | 180 | // const d.ContactFlags comumContactFlags = d.ContactFlags.SoftERP | d.ContactFlags.SoftCFM |d.ContactFlags.Approx1 | d.ContactFlags.Bounce; |
181 | 181 | ||
182 | const d.ContactFlags comumContactFlags = d.ContactFlags.Bounce | d.ContactFlags.Approx1 | d.ContactFlags.Slip1 | d.ContactFlags.Slip2; | 182 | // const d.ContactFlags comumContactFlags = d.ContactFlags.Bounce | d.ContactFlags.Approx1 | d.ContactFlags.Slip1 | d.ContactFlags.Slip2; |
183 | const d.ContactFlags comumContactFlags = d.ContactFlags.Bounce | d.ContactFlags.Approx1; | ||
183 | const float comumContactERP = 0.75f; | 184 | const float comumContactERP = 0.75f; |
184 | const float comumContactCFM = 0.0001f; | 185 | const float comumContactCFM = 0.0001f; |
185 | const float comumContactSLIP = 0f; | 186 | const float comumContactSLIP = 0f; |
186 | 187 | ||
187 | float frictionMovementMult = 0.8f; | 188 | // float frictionMovementMult = 0.2f; |
188 | 189 | ||
189 | float TerrainBounce = 0.001f; | 190 | float TerrainBounce = 0.001f; |
190 | float TerrainFriction = 0.3f; | 191 | float TerrainFriction = 0.3f; |
@@ -866,9 +867,9 @@ namespace OpenSim.Region.PhysicsModule.ubOde | |||
866 | break; | 867 | break; |
867 | 868 | ||
868 | case (int)ActorTypes.Prim: | 869 | case (int)ActorTypes.Prim: |
869 | Vector3 relV = p1.rootVelocity - p2.rootVelocity; | 870 | // Vector3 relV = p1.rootVelocity - p2.rootVelocity; |
870 | float relVlenSQ = relV.LengthSquared(); | 871 | // float relVlenSQ = relV.LengthSquared(); |
871 | if (relVlenSQ > 0.0001f) | 872 | // if (relVlenSQ > 0.0001f) |
872 | { | 873 | { |
873 | p1.CollidingObj = true; | 874 | p1.CollidingObj = true; |
874 | p2.CollidingObj = true; | 875 | p2.CollidingObj = true; |
@@ -878,8 +879,8 @@ namespace OpenSim.Region.PhysicsModule.ubOde | |||
878 | bounce = contactdata1.bounce * contactdata2.bounce; | 879 | bounce = contactdata1.bounce * contactdata2.bounce; |
879 | mu = (float)Math.Sqrt(contactdata1.mu * contactdata2.mu); | 880 | mu = (float)Math.Sqrt(contactdata1.mu * contactdata2.mu); |
880 | 881 | ||
881 | if (relVlenSQ > 0.01f) | 882 | // if (relVlenSQ > 0.01f) |
882 | mu *= frictionMovementMult; | 883 | // mu *= frictionMovementMult; |
883 | 884 | ||
884 | if(d.GeomGetClass(g2) == d.GeomClassID.TriMeshClass && | 885 | if(d.GeomGetClass(g2) == d.GeomClassID.TriMeshClass && |
885 | d.GeomGetClass(g1) == d.GeomClassID.TriMeshClass) | 886 | d.GeomGetClass(g1) == d.GeomClassID.TriMeshClass) |
@@ -891,9 +892,9 @@ namespace OpenSim.Region.PhysicsModule.ubOde | |||
891 | bounce = contactdata1.bounce * TerrainBounce; | 892 | bounce = contactdata1.bounce * TerrainBounce; |
892 | mu = (float)Math.Sqrt(contactdata1.mu * TerrainFriction); | 893 | mu = (float)Math.Sqrt(contactdata1.mu * TerrainFriction); |
893 | 894 | ||
894 | Vector3 v1 = p1.rootVelocity; | 895 | // Vector3 v1 = p1.rootVelocity; |
895 | if (Math.Abs(v1.X) > 0.1f || Math.Abs(v1.Y) > 0.1f) | 896 | // if (Math.Abs(v1.X) > 0.1f || Math.Abs(v1.Y) > 0.1f) |
896 | mu *= frictionMovementMult; | 897 | // mu *= frictionMovementMult; |
897 | p1.CollidingGround = true; | 898 | p1.CollidingGround = true; |
898 | 899 | ||
899 | if(d.GeomGetClass(g1) == d.GeomClassID.TriMeshClass) | 900 | if(d.GeomGetClass(g1) == d.GeomClassID.TriMeshClass) |
@@ -918,9 +919,9 @@ namespace OpenSim.Region.PhysicsModule.ubOde | |||
918 | 919 | ||
919 | // if (curContact.side1 > 0) // should be 2 ? | 920 | // if (curContact.side1 > 0) // should be 2 ? |
920 | // IgnoreNegSides = true; | 921 | // IgnoreNegSides = true; |
921 | Vector3 v2 = p2.rootVelocity; | 922 | // Vector3 v2 = p2.rootVelocity; |
922 | if (Math.Abs(v2.X) > 0.1f || Math.Abs(v2.Y) > 0.1f) | 923 | // if (Math.Abs(v2.X) > 0.1f || Math.Abs(v2.Y) > 0.1f) |
923 | mu *= frictionMovementMult; | 924 | // mu *= frictionMovementMult; |
924 | 925 | ||
925 | if(d.GeomGetClass(g2) == d.GeomClassID.TriMeshClass) | 926 | if(d.GeomGetClass(g2) == d.GeomClassID.TriMeshClass) |
926 | smoothMesh = true; | 927 | smoothMesh = true; |