diff options
author | UbitUmarov | 2012-10-09 00:44:02 +0100 |
---|---|---|
committer | UbitUmarov | 2012-10-09 00:44:02 +0100 |
commit | 2e223c8ce2ccceeca87ae18522a3370e2a5565c9 (patch) | |
tree | 4649a7a5ca698e85ab324723b00c6546d80c15f0 | |
parent | move terrain geom to own ode space. Limit range on raycast if includes (diff) | |
download | opensim-SC-2e223c8ce2ccceeca87ae18522a3370e2a5565c9.zip opensim-SC-2e223c8ce2ccceeca87ae18522a3370e2a5565c9.tar.gz opensim-SC-2e223c8ce2ccceeca87ae18522a3370e2a5565c9.tar.bz2 opensim-SC-2e223c8ce2ccceeca87ae18522a3370e2a5565c9.tar.xz |
Change ray to land colision range limitation so it has no impact on other
geom types
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs | 14 |
1 files 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 | |||
261 | closestHit = ((CurrentRayFilter & RayFilterFlags.ClosestHit) == 0 ? 0 : 1); | 261 | closestHit = ((CurrentRayFilter & RayFilterFlags.ClosestHit) == 0 ? 0 : 1); |
262 | backfacecull = ((CurrentRayFilter & RayFilterFlags.BackFaceCull) == 0 ? 0 : 1); | 262 | backfacecull = ((CurrentRayFilter & RayFilterFlags.BackFaceCull) == 0 ? 0 : 1); |
263 | 263 | ||
264 | // current ode land to ray collisions is very bad | ||
265 | // so for now limit its range badly | ||
266 | |||
267 | if (req.length > 30.0f && (CurrentRayFilter & RayFilterFlags.land) != 0) | ||
268 | req.length = 30.0f; | ||
269 | |||
270 | d.GeomRaySetLength(ray, req.length); | 264 | d.GeomRaySetLength(ray, req.length); |
271 | d.GeomRaySet(ray, req.Origin.X, req.Origin.Y, req.Origin.Z, req.Normal.X, req.Normal.Y, req.Normal.Z); | 265 | d.GeomRaySet(ray, req.Origin.X, req.Origin.Y, req.Origin.Z, req.Normal.X, req.Normal.Y, req.Normal.Z); |
272 | d.GeomRaySetParams(ray, 0, backfacecull); | 266 | d.GeomRaySetParams(ray, 0, backfacecull); |
@@ -334,7 +328,15 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
334 | if ((CurrentRayFilter & FilterStaticSpace) != 0 && (m_contactResults.Count < CurrentMaxCount)) | 328 | if ((CurrentRayFilter & FilterStaticSpace) != 0 && (m_contactResults.Count < CurrentMaxCount)) |
335 | d.SpaceCollide2(ray, m_scene.StaticSpace, IntPtr.Zero, nearCallback); | 329 | d.SpaceCollide2(ray, m_scene.StaticSpace, IntPtr.Zero, nearCallback); |
336 | if ((CurrentRayFilter & RayFilterFlags.land) != 0 && (m_contactResults.Count < CurrentMaxCount)) | 330 | if ((CurrentRayFilter & RayFilterFlags.land) != 0 && (m_contactResults.Count < CurrentMaxCount)) |
331 | { | ||
332 | // current ode land to ray collisions is very bad | ||
333 | // so for now limit its range badly | ||
334 | |||
335 | if (req.length > 30.0f) | ||
336 | d.GeomRaySetLength(ray, 30.0f); | ||
337 | |||
337 | d.SpaceCollide2(ray, m_scene.GroundSpace, IntPtr.Zero, nearCallback); | 338 | d.SpaceCollide2(ray, m_scene.GroundSpace, IntPtr.Zero, nearCallback); |
339 | } | ||
338 | 340 | ||
339 | if (req.callbackMethod is RaycastCallback) | 341 | if (req.callbackMethod is RaycastCallback) |
340 | { | 342 | { |