diff options
author | Robert Adams | 2012-12-29 10:19:47 -0800 |
---|---|---|
committer | Robert Adams | 2012-12-29 10:19:47 -0800 |
commit | 28a8949b9f315e9257a6c51d8872cd99d00fe556 (patch) | |
tree | 8c34f55ddbaefe26fec625a249002b35b7dc9282 | |
parent | BulletSim: an 'if' to suppress multiple setting of avatar orientation. (diff) | |
download | opensim-SC_OLD-28a8949b9f315e9257a6c51d8872cd99d00fe556.zip opensim-SC_OLD-28a8949b9f315e9257a6c51d8872cd99d00fe556.tar.gz opensim-SC_OLD-28a8949b9f315e9257a6c51d8872cd99d00fe556.tar.bz2 opensim-SC_OLD-28a8949b9f315e9257a6c51d8872cd99d00fe556.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs index e19b5b3..3b77e49 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | |||
@@ -217,6 +217,7 @@ public sealed class BSCharacter : BSPhysObject | |||
217 | // 'stepVelocity' is now the speed we'd like the avatar to move in. Turn that into an instantanous force. | 217 | // 'stepVelocity' is now the speed we'd like the avatar to move in. Turn that into an instantanous force. |
218 | OMV.Vector3 moveForce = (stepVelocity - _velocity) * Mass / PhysicsScene.LastTimeStep; | 218 | OMV.Vector3 moveForce = (stepVelocity - _velocity) * Mass / PhysicsScene.LastTimeStep; |
219 | 219 | ||
220 | /* | ||
220 | // If moveForce is very small, zero things so we don't keep sending microscopic updates to the user | 221 | // If moveForce is very small, zero things so we don't keep sending microscopic updates to the user |
221 | float moveForceMagnitudeSquared = moveForce.LengthSquared(); | 222 | float moveForceMagnitudeSquared = moveForce.LengthSquared(); |
222 | if (moveForceMagnitudeSquared < 0.0001) | 223 | if (moveForceMagnitudeSquared < 0.0001) |
@@ -227,10 +228,12 @@ public sealed class BSCharacter : BSPhysObject | |||
227 | } | 228 | } |
228 | else | 229 | else |
229 | { | 230 | { |
230 | DetailLog("{0},BSCharacter.MoveMotor,move,stepVel={1},vel={2},mass={3},moveForce={4}", | ||
231 | LocalID, stepVelocity, _velocity, Mass, moveForce); | ||
232 | AddForce(moveForce, false, true); | 231 | AddForce(moveForce, false, true); |
233 | } | 232 | } |
233 | */ | ||
234 | DetailLog("{0},BSCharacter.MoveMotor,move,stepVel={1},vel={2},mass={3},moveForce={4}", | ||
235 | LocalID, stepVelocity, _velocity, Mass, moveForce); | ||
236 | AddForce(moveForce, false, true); | ||
234 | }); | 237 | }); |
235 | } | 238 | } |
236 | 239 | ||
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs index b909b38..b361498 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | |||
@@ -80,7 +80,7 @@ public enum FixedShapeKey : ulong | |||
80 | KEY_SPHERE = 2, | 80 | KEY_SPHERE = 2, |
81 | KEY_CONE = 3, | 81 | KEY_CONE = 3, |
82 | KEY_CYLINDER = 4, | 82 | KEY_CYLINDER = 4, |
83 | KEY_CAPSULE = 5, | 83 | KEY_CAPSULE = 5, |
84 | KEY_AVATAR = 6, | 84 | KEY_AVATAR = 6, |
85 | } | 85 | } |
86 | 86 | ||