From 6480b72eda967d6166cb8a64c5bca20c7841358c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 16 Apr 2012 19:44:02 +0100 Subject: 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 --- OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs') 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 // end add Kitto Flora } + if (vel.X * vel.X + vel.Y * vel.Y + vel.Z * vel.Z > 2500.0f) // 50m/s apply breaks + { + float breakfactor = 0.16f * m_mass; // will give aprox 60m/s terminal velocity at free fall + vec.X -= breakfactor * vel.X; + vec.Y -= breakfactor * vel.Y; + vec.Z -= breakfactor * vel.Z; + } + if (vec.IsFinite()) { if (vec.X != 0 || vec.Y !=0 || vec.Z !=0) -- cgit v1.1