Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork

avinationmerge
ubit 2012-07-07 04:20:39 +02:00
commit 6a1ccbfef3
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_amdampY;
float m_amdampZ; float m_amdampZ;
public float FrictionFactor public float FrictionFactor
{ {
get get
@ -145,6 +146,7 @@ namespace OpenSim.Region.Physics.OdePlugin
} }
} }
public ODEDynamics(OdePrim rootp) public ODEDynamics(OdePrim rootp)
{ {
rootPrim = rootp; rootPrim = rootp;
@ -345,7 +347,7 @@ namespace OpenSim.Region.Physics.OdePlugin
m_lmDecay = 1.0f - 1.0f / m_linearMotorDecayTimescale; m_lmDecay = 1.0f - 1.0f / m_linearMotorDecayTimescale;
m_lmEfect = 1.0f; // turn it on m_lmEfect = 1.0f; // turn it on
m_ffactor = 0.01f; m_ffactor = 0.0f;
if (rootPrim.Body != IntPtr.Zero && !d.BodyIsEnabled(rootPrim.Body) if (rootPrim.Body != IntPtr.Zero && !d.BodyIsEnabled(rootPrim.Body)
&& !rootPrim.m_isSelected && !rootPrim.m_disabled) && !rootPrim.m_isSelected && !rootPrim.m_disabled)
d.BodyEnable(rootPrim.Body); d.BodyEnable(rootPrim.Body);
@ -401,7 +403,7 @@ namespace OpenSim.Region.Physics.OdePlugin
m_lmEfect = 1.0f; // turn it on m_lmEfect = 1.0f; // turn it on
m_lmDecay = 1.0f - 1.0f / m_linearMotorDecayTimescale; 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) if (rootPrim.Body != IntPtr.Zero && !d.BodyIsEnabled(rootPrim.Body)
&& !rootPrim.m_isSelected && !rootPrim.m_disabled) && !rootPrim.m_isSelected && !rootPrim.m_disabled)
d.BodyEnable(rootPrim.Body); d.BodyEnable(rootPrim.Body);
@ -805,7 +807,8 @@ namespace OpenSim.Region.Physics.OdePlugin
} }
m_lmEfect *= m_lmDecay; 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 else
{ {

View File

@ -275,6 +275,7 @@ namespace OpenSim.Region.Physics.OdePlugin
if (veh != null && veh.Type != Vehicle.TYPE_NONE) if (veh != null && veh.Type != Vehicle.TYPE_NONE)
cdata.mu *= veh.FrictionFactor; 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.WorldSetGravity(world, gravityx, gravityy, gravityz);
d.WorldSetContactSurfaceLayer(world, contactsurfacelayer); d.WorldSetContactSurfaceLayer(world, contactsurfacelayer);
d.WorldSetLinearDamping(world, 0.001f); d.WorldSetLinearDamping(world, 0.002f);
d.WorldSetAngularDamping(world, 0.001f); d.WorldSetAngularDamping(world, 0.002f);
d.WorldSetAngularDampingThreshold(world, 0f); d.WorldSetAngularDampingThreshold(world, 0f);
d.WorldSetLinearDampingThreshold(world, 0f); d.WorldSetLinearDampingThreshold(world, 0f);
d.WorldSetMaxAngularSpeed(world, 100f); d.WorldSetMaxAngularSpeed(world, 100f);