aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-04-16 19:44:02 +0100
committerUbitUmarov2012-04-16 19:44:02 +0100
commit6480b72eda967d6166cb8a64c5bca20c7841358c (patch)
tree0be0758a12851ad26f7b2ddd55eb24314470055a /OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
parentchODE: if character velocity > 50m/s apply breaks. In free fall this will giv... (diff)
downloadopensim-SC_OLD-6480b72eda967d6166cb8a64c5bca20c7841358c.zip
opensim-SC_OLD-6480b72eda967d6166cb8a64c5bca20c7841358c.tar.gz
opensim-SC_OLD-6480b72eda967d6166cb8a64c5bca20c7841358c.tar.bz2
opensim-SC_OLD-6480b72eda967d6166cb8a64c5bca20c7841358c.tar.xz
ubitODE: - fix remove characters from default raycasts filters as older code (or camera is very odd) - Slow down avatar if velocity is higher than 50m/s as in chODE
Diffstat (limited to 'OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
index b9bb06e..3185aad 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
@@ -990,6 +990,14 @@ namespace OpenSim.Region.Physics.OdePlugin
990 // end add Kitto Flora 990 // end add Kitto Flora
991 } 991 }
992 992
993 if (vel.X * vel.X + vel.Y * vel.Y + vel.Z * vel.Z > 2500.0f) // 50m/s apply breaks
994 {
995 float breakfactor = 0.16f * m_mass; // will give aprox 60m/s terminal velocity at free fall
996 vec.X -= breakfactor * vel.X;
997 vec.Y -= breakfactor * vel.Y;
998 vec.Z -= breakfactor * vel.Z;
999 }
1000
993 if (vec.IsFinite()) 1001 if (vec.IsFinite())
994 { 1002 {
995 if (vec.X != 0 || vec.Y !=0 || vec.Z !=0) 1003 if (vec.X != 0 || vec.Y !=0 || vec.Z !=0)