Changed application of constant forces to after PID force is applied. llSetForce() should behave identical to the Linden implementation now.
parent
cdd3537706
commit
c67198299e
|
@ -750,7 +750,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
changeshape(timestep);
|
||||
//
|
||||
|
||||
if (m_taintforce || m_force != new PhysicsVector(0.0f, 0.0f, 0.0f))
|
||||
if (m_taintforce)
|
||||
changeAddForce(timestep);
|
||||
|
||||
if (m_taintdisable)
|
||||
|
@ -1194,6 +1194,10 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
fy *= m_mass;
|
||||
//fz *= m_mass;
|
||||
|
||||
fx += m_force.X;
|
||||
fy += m_force.Y;
|
||||
fz += m_force.Z;
|
||||
|
||||
//m_log.Info("[OBJPID]: X:" + fx.ToString() + " Y:" + fy.ToString() + " Z:" + fz.ToString());
|
||||
if (fx != 0 || fy != 0 || fz != 0)
|
||||
{
|
||||
|
@ -1752,8 +1756,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
//m_log.Info("[PHYSICS]: dequeing forcelist");
|
||||
if (IsPhysical)
|
||||
{
|
||||
//PhysicsVector iforce = new PhysicsVector();
|
||||
PhysicsVector iforce = m_force * 100.0f;
|
||||
PhysicsVector iforce = new PhysicsVector();
|
||||
for (int i = 0; i < m_forcelist.Count; i++)
|
||||
{
|
||||
iforce = iforce + (m_forcelist[i] * 100);
|
||||
|
@ -1767,6 +1770,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
m_collisionscore = 0;
|
||||
m_interpenetrationcount = 0;
|
||||
}
|
||||
|
||||
m_taintforce = false;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue