diff options
author | UbitUmarov | 2016-11-06 03:53:12 +0000 |
---|---|---|
committer | UbitUmarov | 2016-11-06 03:53:12 +0000 |
commit | 014cd1ab428feff96484c666694c33822344269e (patch) | |
tree | 5c20753e4f1613d69f1a3aa7b1e2d80ce82248b1 /OpenSim/Region/PhysicsModules | |
parent | change llGetTime() source clock (diff) | |
download | opensim-SC_OLD-014cd1ab428feff96484c666694c33822344269e.zip opensim-SC_OLD-014cd1ab428feff96484c666694c33822344269e.tar.gz opensim-SC_OLD-014cd1ab428feff96484c666694c33822344269e.tar.bz2 opensim-SC_OLD-014cd1ab428feff96484c666694c33822344269e.tar.xz |
restrict ubOde castray with terrain range only on horizontal plane, let it find physical avatars.
Diffstat (limited to 'OpenSim/Region/PhysicsModules')
-rw-r--r-- | OpenSim/Region/PhysicsModules/ubOde/ODERayCastRequestManager.cs | 11 |
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 | ||