BulletSim: add ToString override to BSVMotor.

This commit is contained in:
Robert Adams
2012-11-25 19:05:42 -08:00
parent 319ec3235c
commit f977131fe0

View File

@@ -75,7 +75,7 @@ public class BSVMotor : BSMotor
Vector3 origTarget = TargetValue; // DEBUG
Vector3 origCurrVal = CurrentValue; // DEBUG
// Add (desiredVector - currentAppliedVector) / howLongItShouldTakeToComplete
// Addition = (desiredVector - currentAppliedVector) / secondsItShouldTakeToComplete
Vector3 addAmount = (TargetValue - CurrentValue)/TimeScale * timeStep;
CurrentValue += addAmount;
returnCurrent = CurrentValue;
@@ -109,6 +109,11 @@ public class BSVMotor : BSMotor
}
return returnCurrent;
}
public override string ToString()
{
return String.Format("<{0},curr={1},targ={2},decayTS={3},frictTS={4}>",
UseName, CurrentValue, TargetValue, TargetValueDecayTimeScale, FrictionTimescale);
}
}
public class BSFMotor : BSMotor