mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
BulletSim: add ToString override to BSVMotor.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user