- Code: Select all
void ProcessAllRocketEngineSequences(void)
{
m_currentTime = dGetTimeInMicroseconds();
for (unsigned int i = 0; i < m_RocketEngineGroupList.size(); i++)
ProcessRocketEngineSequence(m_RocketEngineGroupList[i].strLabel);
m_previousTime = m_currentTime;
}
Everything works well when my sim runs, but when the visual frame rate drops (for whatever reason), I notice that the rocket engine performance drastically changes - the fuel consumption jumps and thrust drops. Since the calcs are based on the time slice, and I am using the m_currentTime and m_previousTime to determine the time elapsed, why would the FPS drop matter? It would just mean that the time slice is larger, and the calcs adjust accordingly, right?
Relying on the demoSandbox code, the following function
- Code: Select all
void DemoEntityManager::UpdatePhysics(dFloat timestep)
does not use timestep parameter at all, but relies on the internal code to determine the timestep.
[EDIT] I just checked the parameters, and the thrust and fuel consumption do not change, but the rocket slows down, and it basically takes twice the time to travel the given distance. So obviously, visual FPS is somehow tied into Physics engine - but how? I obviously left out something from my code... What am I missing?