BulletSim: add ToString override to BSVMotor.
parent
319ec3235c
commit
f977131fe0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue