BulletSim: remove check for small motor movement because, while it
did the right thing for stopping (speed reducing to zero), it prevented movement from starting (speed increasing from zero). Will revisit when the generalize PID motor is debugged.0.7.5-pf-bulletsim
parent
0538096fa3
commit
28a8949b9f
|
@ -217,6 +217,7 @@ public sealed class BSCharacter : BSPhysObject
|
||||||
// 'stepVelocity' is now the speed we'd like the avatar to move in. Turn that into an instantanous force.
|
// 'stepVelocity' is now the speed we'd like the avatar to move in. Turn that into an instantanous force.
|
||||||
OMV.Vector3 moveForce = (stepVelocity - _velocity) * Mass / PhysicsScene.LastTimeStep;
|
OMV.Vector3 moveForce = (stepVelocity - _velocity) * Mass / PhysicsScene.LastTimeStep;
|
||||||
|
|
||||||
|
/*
|
||||||
// If moveForce is very small, zero things so we don't keep sending microscopic updates to the user
|
// If moveForce is very small, zero things so we don't keep sending microscopic updates to the user
|
||||||
float moveForceMagnitudeSquared = moveForce.LengthSquared();
|
float moveForceMagnitudeSquared = moveForce.LengthSquared();
|
||||||
if (moveForceMagnitudeSquared < 0.0001)
|
if (moveForceMagnitudeSquared < 0.0001)
|
||||||
|
@ -227,10 +228,12 @@ public sealed class BSCharacter : BSPhysObject
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DetailLog("{0},BSCharacter.MoveMotor,move,stepVel={1},vel={2},mass={3},moveForce={4}",
|
|
||||||
LocalID, stepVelocity, _velocity, Mass, moveForce);
|
|
||||||
AddForce(moveForce, false, true);
|
AddForce(moveForce, false, true);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
DetailLog("{0},BSCharacter.MoveMotor,move,stepVel={1},vel={2},mass={3},moveForce={4}",
|
||||||
|
LocalID, stepVelocity, _velocity, Mass, moveForce);
|
||||||
|
AddForce(moveForce, false, true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue