Merge branch 'ubitwork' into avination

avinationmerge
Melanie 2012-07-07 03:17:32 +02:00
commit de01c0df26
3 changed files with 9 additions and 5 deletions

View File

@ -137,6 +137,7 @@ namespace OpenSim.Region.Physics.OdePlugin
float m_amdampY;
float m_amdampZ;
public float FrictionFactor
{
get
@ -145,6 +146,7 @@ namespace OpenSim.Region.Physics.OdePlugin
}
}
public ODEDynamics(OdePrim rootp)
{
rootPrim = rootp;
@ -345,7 +347,7 @@ namespace OpenSim.Region.Physics.OdePlugin
m_lmDecay = 1.0f - 1.0f / m_linearMotorDecayTimescale;
m_lmEfect = 1.0f; // turn it on
m_ffactor = 0.01f;
m_ffactor = 0.0f;
if (rootPrim.Body != IntPtr.Zero && !d.BodyIsEnabled(rootPrim.Body)
&& !rootPrim.m_isSelected && !rootPrim.m_disabled)
d.BodyEnable(rootPrim.Body);
@ -401,7 +403,7 @@ namespace OpenSim.Region.Physics.OdePlugin
m_lmEfect = 1.0f; // turn it on
m_lmDecay = 1.0f - 1.0f / m_linearMotorDecayTimescale;
m_ffactor = 0.01f;
m_ffactor = 0.0f;
if (rootPrim.Body != IntPtr.Zero && !d.BodyIsEnabled(rootPrim.Body)
&& !rootPrim.m_isSelected && !rootPrim.m_disabled)
d.BodyEnable(rootPrim.Body);
@ -805,7 +807,8 @@ namespace OpenSim.Region.Physics.OdePlugin
}
m_lmEfect *= m_lmDecay;
m_ffactor = 0.01f + 1e-4f * curVel.LengthSquared();
// m_ffactor = 0.01f + 1e-4f * curVel.LengthSquared();
m_ffactor = 0.0f;
}
else
{

View File

@ -275,6 +275,7 @@ namespace OpenSim.Region.Physics.OdePlugin
if (veh != null && veh.Type != Vehicle.TYPE_NONE)
cdata.mu *= veh.FrictionFactor;
// cdata.mu *= 0;
}
}

View File

@ -526,8 +526,8 @@ namespace OpenSim.Region.Physics.OdePlugin
d.WorldSetGravity(world, gravityx, gravityy, gravityz);
d.WorldSetContactSurfaceLayer(world, contactsurfacelayer);
d.WorldSetLinearDamping(world, 0.001f);
d.WorldSetAngularDamping(world, 0.001f);
d.WorldSetLinearDamping(world, 0.002f);
d.WorldSetAngularDamping(world, 0.002f);
d.WorldSetAngularDampingThreshold(world, 0f);
d.WorldSetLinearDampingThreshold(world, 0f);
d.WorldSetMaxAngularSpeed(world, 100f);