|
|
Chambers wrote:
> So, playing with particles recently, I noticed a small* problem.
>
> "Fixing" your timestep, such that it is always processed in increments of some
> arbitrary value, greatly increases the quality of your simulation. When dt
> seconds have passed, and your timestep is the arbitrary value ts, then
>
> while (dt > ts)
> step(ts)
> dt -= ts
>
> The fun part comes up when the time required to do a simulation step is greater
> than the time stepped (ts).
Only if you want real-time performance. For us animators, that's not an
issue.
If you have access to system timekeeping, simply measure the start and
end times at the beginning and end of each loop, and advance the time
clock by that value at the end of each pass.
Regards,
John
Post a reply to this message
|
|