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 ++++++++ .../Physics/UbitOdePlugin/ODERayCastRequestManager.cs | 16 ++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/Physics') 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) diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs index e66580d..5122ebf 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs @@ -94,7 +94,7 @@ namespace OpenSim.Region.Physics.OdePlugin req.length = length; req.Normal = direction; req.Origin = position; - req.filter = RayFilterFlags.AllButLand; + req.filter = RayFilterFlags.AllPrims; m_PendingRequests.Enqueue(req); } @@ -115,7 +115,7 @@ namespace OpenSim.Region.Physics.OdePlugin req.Normal = direction; req.Origin = position; req.Count = DefaultMaxCount; - req.filter = RayFilterFlags.AllButLand; + req.filter = RayFilterFlags.AllPrims; m_PendingRequests.Enqueue(req); } @@ -129,7 +129,7 @@ namespace OpenSim.Region.Physics.OdePlugin req.length = length; req.Normal = direction; req.Origin = position; - req.filter = RayFilterFlags.AllButLand; + req.filter = RayFilterFlags.AllPrims; m_PendingRequests.Enqueue(req); } @@ -143,7 +143,7 @@ namespace OpenSim.Region.Physics.OdePlugin req.Normal = direction; req.Origin = position; req.Count = DefaultMaxCount; - req.filter = RayFilterFlags.AllButLand; + req.filter = RayFilterFlags.AllPrims; m_PendingRequests.Enqueue(req); } @@ -165,7 +165,7 @@ namespace OpenSim.Region.Physics.OdePlugin req.Normal = direction; req.Origin = position; req.Count = count; - req.filter = RayFilterFlags.AllButLand; + req.filter = RayFilterFlags.AllPrims; m_PendingRequests.Enqueue(req); } @@ -194,7 +194,7 @@ namespace OpenSim.Region.Physics.OdePlugin req.Normal = direction; req.Origin = position; req.Count = count; - req.filter = RayFilterFlags.AllButLand; + req.filter = RayFilterFlags.AllPrims; m_PendingRequests.Enqueue(req); } @@ -208,7 +208,7 @@ namespace OpenSim.Region.Physics.OdePlugin req.Normal = direction; req.Origin = position; req.Count = count; - req.filter = RayFilterFlags.AllButLand; + req.filter = RayFilterFlags.AllPrims; m_PendingRequests.Enqueue(req); } @@ -222,7 +222,7 @@ namespace OpenSim.Region.Physics.OdePlugin req.Normal = direction; req.Origin = position; req.Count = count; - req.filter = RayFilterFlags.AllButLand; + req.filter = RayFilterFlags.AllPrims; m_PendingRequests.Enqueue(req); } -- cgit v1.1