From 2e223c8ce2ccceeca87ae18522a3370e2a5565c9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 9 Oct 2012 00:44:02 +0100 Subject: Change ray to land colision range limitation so it has no impact on other geom types --- .../Physics/UbitOdePlugin/ODERayCastRequestManager.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs index 06cb302..799a324 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs @@ -261,12 +261,6 @@ namespace OpenSim.Region.Physics.OdePlugin closestHit = ((CurrentRayFilter & RayFilterFlags.ClosestHit) == 0 ? 0 : 1); backfacecull = ((CurrentRayFilter & RayFilterFlags.BackFaceCull) == 0 ? 0 : 1); - // current ode land to ray collisions is very bad - // so for now limit its range badly - - if (req.length > 30.0f && (CurrentRayFilter & RayFilterFlags.land) != 0) - req.length = 30.0f; - d.GeomRaySetLength(ray, req.length); d.GeomRaySet(ray, req.Origin.X, req.Origin.Y, req.Origin.Z, req.Normal.X, req.Normal.Y, req.Normal.Z); d.GeomRaySetParams(ray, 0, backfacecull); @@ -334,7 +328,15 @@ namespace OpenSim.Region.Physics.OdePlugin if ((CurrentRayFilter & FilterStaticSpace) != 0 && (m_contactResults.Count < CurrentMaxCount)) d.SpaceCollide2(ray, m_scene.StaticSpace, IntPtr.Zero, nearCallback); if ((CurrentRayFilter & RayFilterFlags.land) != 0 && (m_contactResults.Count < CurrentMaxCount)) + { + // current ode land to ray collisions is very bad + // so for now limit its range badly + + if (req.length > 30.0f) + d.GeomRaySetLength(ray, 30.0f); + d.SpaceCollide2(ray, m_scene.GroundSpace, IntPtr.Zero, nearCallback); + } if (req.callbackMethod is RaycastCallback) { -- cgit v1.1