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

avinationmerge
UbitUmarov 2012-04-16 19:44:02 +01:00
parent fff5c61ae8
commit 6480b72eda
2 changed files with 16 additions and 8 deletions

View File

@ -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)

View File

@ -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);
}