|
|
@ -253,11 +253,6 @@ void plAnimatedMovementStrategy::RecalcVelocity(double timeNow, hsScalar elapsed |
|
|
|
|
|
|
|
|
|
|
|
IRecalcLinearVelocity(elapsed, prevMat, curMat); |
|
|
|
IRecalcLinearVelocity(elapsed, prevMat, curMat); |
|
|
|
IRecalcAngularVelocity(elapsed, prevMat, curMat); |
|
|
|
IRecalcAngularVelocity(elapsed, prevMat, curMat); |
|
|
|
|
|
|
|
|
|
|
|
// Update controller rotation
|
|
|
|
|
|
|
|
hsScalar zRot = fAnimAngularVel + fTurnStr; |
|
|
|
|
|
|
|
if (hsABS(zRot) > 0.0001f) |
|
|
|
|
|
|
|
fController->IncrementAngle(zRot * elapsed); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
@ -265,6 +260,11 @@ void plAnimatedMovementStrategy::RecalcVelocity(double timeNow, hsScalar elapsed |
|
|
|
fAnimAngularVel = 0.0f; |
|
|
|
fAnimAngularVel = 0.0f; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Update controller rotation
|
|
|
|
|
|
|
|
hsScalar zRot = fAnimAngularVel + fTurnStr; |
|
|
|
|
|
|
|
if (hsABS(zRot) > 0.0001f) |
|
|
|
|
|
|
|
fController->IncrementAngle(zRot * elapsed); |
|
|
|
|
|
|
|
|
|
|
|
// Update controller velocity
|
|
|
|
// Update controller velocity
|
|
|
|
fController->SetLinearVelocity(fAnimLinearVel); |
|
|
|
fController->SetLinearVelocity(fAnimLinearVel); |
|
|
|
} |
|
|
|
} |
|
|
|