BulletSim: modify motors to return correction rather than current value

to better use them for incremental updates.
Modify prim and character to use the new motors.
Simplify the vehicle linear movement code to just update the velocity
directly or the basic movement.
This commit is contained in:
Robert Adams
2013-01-20 09:33:13 -08:00
parent 2c517d792f
commit 3b0df52d10
5 changed files with 36 additions and 38 deletions

View File

@@ -198,7 +198,8 @@ public sealed class BSCharacter : BSPhysObject
// TODO: Decide if the step parameters should be changed depending on the avatar's
// state (flying, colliding, ...). There is code in ODE to do this.
OMV.Vector3 stepVelocity = _velocityMotor.Step(timeStep);
_velocityMotor.Step(timeStep);
OMV.Vector3 stepVelocity = _velocityMotor.CurrentValue;
// If falling, we keep the world's downward vector no matter what the other axis specify.
if (!Flying && !IsColliding)