I developed a standlone application and if I print out how often world.step() function is called - it is 50ms. I have no benchmark as to what is the update rate of the world normally?
Is there a realtime factor that can indicate this?
I developed a standlone application and if I print out how often world.step() function is called - it is 50ms. I have no benchmark as to what is the update rate of the world normally?
Is there a realtime factor that can indicate this?
The default rate is 60 Hz physics stepping for simulation time. This is not related to real time, for my project I constrain (no guarantees) with logic equivalent to below
current_time = time.time()
goal_time = start + physics_frame / TARGET_FRAMERATE
if goal_time > current_time:
time.sleep(goal_time-current_time)
while simulation framerate can be set in the SimulationContext.
To add onto @mark.haoxiang’s response
You can do something like this to determine the difference between the realtime clock and simulation time, and wait accordingly.