aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/ubOde/ODERayCastRequestManager.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODERayCastRequestManager.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODERayCastRequestManager.cs b/OpenSim/Region/PhysicsModules/ubOde/ODERayCastRequestManager.cs
index b82d593..adefd5e 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODERayCastRequestManager.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODERayCastRequestManager.cs
@@ -317,8 +317,17 @@ namespace OpenSim.Region.PhysicsModule.ubOde
317 // current ode land to ray collisions is very bad 317 // current ode land to ray collisions is very bad
318 // so for now limit its range badly 318 // so for now limit its range badly
319 if (req.length > 60.0f) 319 if (req.length > 60.0f)
320 d.GeomRaySetLength(ray, 60.0f); 320 {
321 Vector3 t = req.Normal * req.length;
322 float tmp = t.X * t.X + t.Y * t.Y;
323 if(tmp > 2500)
324 {
325 float tmp2 = req.length * req.length - tmp + 2500;
326 tmp2 = (float)Math.Sqrt(tmp2);
327 d.GeomRaySetLength(ray, tmp2);
328 }
321 329
330 }
322 d.SpaceCollide2(ray, m_scene.GroundSpace, IntPtr.Zero, nearCallback); 331 d.SpaceCollide2(ray, m_scene.GroundSpace, IntPtr.Zero, nearCallback);
323 } 332 }
324 333