Oooops don't hover underground but do hover
parent
f5cb403e7e
commit
e48fa38ff5
|
@ -773,11 +773,13 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
d.Vector3 pos = d.BodyGetPosition(Body);
|
||||
|
||||
float t = _pParentScene.GetTerrainHeightAtXY(pos.X, pos.Y);
|
||||
float perr;
|
||||
|
||||
if (t < m_VhoverHeight) // don't go underground
|
||||
{
|
||||
// default to global
|
||||
float perr = m_VhoverHeight - pos.Z; ;
|
||||
// default to global but don't go underground
|
||||
if (t < m_VhoverHeight)
|
||||
perr = m_VhoverHeight - pos.Z;
|
||||
else
|
||||
perr = t - pos.Z; ;
|
||||
|
||||
if ((m_flags & VehicleFlag.HOVER_GLOBAL_HEIGHT) == 0)
|
||||
{
|
||||
|
@ -806,7 +808,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
else // no buoyancy
|
||||
force.Z += _pParentScene.gravityz;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// default gravity and Buoyancy
|
||||
|
|
Loading…
Reference in New Issue