diff options
author | UbitUmarov | 2016-11-07 11:36:43 +0000 |
---|---|---|
committer | UbitUmarov | 2016-11-07 11:36:43 +0000 |
commit | 93ea7bd7f470a7fd80b6400d39091ffb1780fbd9 (patch) | |
tree | f00524dd18c7d865b2a8a755b4ce1284ff005de3 /OpenSim/Region/PhysicsModules | |
parent | Merge branch 'master' into httptests (diff) | |
parent | add a few more lsl constants for attachments (diff) | |
download | opensim-SC-93ea7bd7f470a7fd80b6400d39091ffb1780fbd9.zip opensim-SC-93ea7bd7f470a7fd80b6400d39091ffb1780fbd9.tar.gz opensim-SC-93ea7bd7f470a7fd80b6400d39091ffb1780fbd9.tar.bz2 opensim-SC-93ea7bd7f470a7fd80b6400d39091ffb1780fbd9.tar.xz |
Merge branch 'master' into httptests
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 | ||