|
|
@ -193,7 +193,7 @@ class ErrorStream : public NxUserOutputStream |
|
|
|
//
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#define kDefaultMaxDelta (0.1) // if the step is greater than .1 seconds, clamp to that
|
|
|
|
#define kDefaultMaxDelta (0.15) // if the step is greater than .15 seconds, clamp to that
|
|
|
|
#define kDefaultStepSize (1.f / 60.f) // default simulation freqency is 60hz
|
|
|
|
#define kDefaultStepSize (1.f / 60.f) // default simulation freqency is 60hz
|
|
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
|
|
/////////////////////////////////////////////////////////////////
|
|
|
@ -469,7 +469,7 @@ void plSimulationMgr::Advance(float delSecs) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Perform as many whole substeps as possible saving the remainder in our accumulator.
|
|
|
|
// Perform as many whole substeps as possible saving the remainder in our accumulator.
|
|
|
|
int numSubSteps = (int)(fAccumulator / kDefaultStepSize); |
|
|
|
int numSubSteps = (int)(fAccumulator / kDefaultStepSize + 0.000001f); |
|
|
|
float delta = numSubSteps * kDefaultStepSize; |
|
|
|
float delta = numSubSteps * kDefaultStepSize; |
|
|
|
fAccumulator -= delta; |
|
|
|
fAccumulator -= delta; |
|
|
|
|
|
|
|
|
|
|
|