Jump to content
PYL

Physics simulation framerate

Recommended Posts

Good evening guys. How does the physics simulation, like velocities, positions, etc... work?

Are calculations updated on every frame (e.g. 60 fps -> 60 physics updates @ second) or do they have a fixed pause between them (e.g. 33 updates at second regardless of frame rate)?

In other words, what is the interval between, for example, object position updates (e.g. t1 = [0,0,0], t2 = [0,1,0], t3 = [0,3,0], ...; interval between each update: 50 ms). Thanks!

Share this post


Link to post
Share on other sites

Anyone? :)

Share this post


Link to post
Share on other sites

Why do you need this information?  You coul try finding one of Dwarden's profiler builds and see what that reveals about whats going on under the hood.

Share this post


Link to post
Share on other sites

After some tests with accTime and diag_tickTime I managed to get the delay between two update which is roughly

accTime * delay = 0.00329716 * 5 = 0.0164858, which means the frequency is

1/time = 1/0.0164858 â‰ˆ 60 times @ seconds.

Now, I don't know if it's 60 for every PC or just in my case since my display has a frequency of 60 Hz.

Could somebody confirm it's either 60 physics updates @ seconds or it's FPS updates @ seconds?

Hope this will be useful for future modders.
Thank you very much!

 

Edit: did a further test @ 12 Fps and it still looks to update 60 times @ seconds.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×