fix object rez on terrain, i broke adding physics assistance
parent
0fb033e567
commit
d0a7e5bd78
|
@ -2333,6 +2333,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
pos = physresults[0].Normal * scale;
|
||||
pos *= 0.5f;
|
||||
pos = physresults[0].Pos + pos;
|
||||
|
||||
if (wpos.Z > pos.Z) pos = wpos;
|
||||
return pos;
|
||||
}
|
||||
foreach (ContactResult r in physresults)
|
||||
|
@ -2345,6 +2347,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
pos = physresults[0].Normal * scale;
|
||||
pos *= 0.5f;
|
||||
pos = physresults[0].Pos + pos;
|
||||
|
||||
if (wpos.Z > pos.Z) pos = wpos;
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
|
@ -2387,6 +2391,8 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// Un-offset the prim (it gets offset later by the consumer method)
|
||||
//pos.Z -= 0.25F;
|
||||
|
||||
if (wpos.Z > pos.Z) pos = wpos;
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2406,20 +2412,22 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// fall back to our stupid functionality
|
||||
pos = RayEnd;
|
||||
}
|
||||
|
||||
if (wpos.Z > pos.Z) pos = wpos;
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// fall back to our stupid functionality
|
||||
pos = RayEnd;
|
||||
|
||||
//increase height so its above the ground.
|
||||
//should be getting the normal of the ground at the rez point and using that?
|
||||
pos.Z += scale.Z / 2f;
|
||||
// return pos;
|
||||
}
|
||||
}
|
||||
|
||||
// fall back to our stupid functionality
|
||||
pos = RayEnd;
|
||||
|
||||
//increase height so its above the ground.
|
||||
//should be getting the normal of the ground at the rez point and using that?
|
||||
pos.Z += scale.Z / 2f;
|
||||
// return pos;
|
||||
// check against posible water intercept
|
||||
if (wpos.Z > pos.Z) pos = wpos;
|
||||
return pos;
|
||||
|
|
Loading…
Reference in New Issue