steviet91 / furmulaone_source

Source repo for the car and track models
MIT License
0 stars 0 forks source link

Option to fix timestep interval #15

Closed Thonners closed 4 years ago

Thonners commented 4 years ago

Rather than relying on differences in system clock time (i.e. from lastUpdateTime and time.now()), would be good to be able to fix the timestep used in the dynamics calculations to a fixed value.

This could be an either/or option, so if manually controlling, use wall time, if auto-controlled, use fixed time step.

The current method makes it good for real-time play, but being able to run a defined timestep means that it's possible to simulate the environment properly whilst not restricting solve times to be within the length of the sleep() command. Benefits of this are:

steviet91 commented 4 years ago

Resolved in issue15 branch, merged onto master