i do have a question regarding multithreading and timing.
Right now i managed to encapsulate the simulation with havok in an extra thread, as well as the rendering to another one.
I did a little thinking and came up with these thoughts:
When havok has a frequency of 60Hz (step size = 0.0166f), subsequential calls to stepDeltaTime should be at the same frequency. So i do a time measure routine and if the thread didn't need the 0.0166 seconds i put him to sleep for the remaining time. If the simulation takes longer than the 0.0166 seconds i put the thread for 1ms to sleep. The simulation looks quite good with that configuration.
Question 1: Is that correct or did i overlook something?
Question 2: It happens that the thread (with the stepDeltaTime) takes longer than the 0.0166 seconds. In fact it doesn't matter what the stepsize is. Is that a normal/acceptable behavior (the deviation is quite small)?