let ode suport var size regions

Signed-off-by: Diva Canto <diva@metaverseink.com>
This commit is contained in:
UbitUmarov
2015-09-05 17:50:55 +01:00
committed by Diva Canto
parent 2210c5807f
commit 13b1c5dfce
2 changed files with 144 additions and 153 deletions

View File

@@ -172,6 +172,13 @@ namespace OpenSim.Region.PhysicsModule.ODE
/// <param name="req"></param>
private void RayCast(ODERayCastRequest req)
{
// UBIT: limit ray lenght or collisions will take all avaiable stack space
// this value may still be too large, depending on machine configuration
// of maximum stack
float len = req.length;
if (len > 250f)
len = 250f;
// Create the ray
IntPtr ray = d.CreateRay(m_scene.space, req.length);
d.GeomRaySet(ray, req.Origin.X, req.Origin.Y, req.Origin.Z, req.Normal.X, req.Normal.Y, req.Normal.Z);