How to Change Simulation Timestep

I am trying to increase the simulation rate of the game. Currently, it works 50 times per second and I want to increase it to 120. I am not sure how to do it but I tried this on a system and it didn't work:


If anyone knows how to do it, please let me know.

I think I found a way to change the frequency of the simulation system with the code below:

With this, the simulation system group ticks 120 per second but SystemApi.Time.FixedDeltaTime returns 0.02 idk why.

1 Like

Yes, this is exactly it. Sorry for the delay here.
By default, we don’t use the FixedRateSimpleManager, but the FixedRateCatchUpManager which tries to ensure that you have real-time simulation by stepping the physics multiple times per step forward in case you get behind.

But, the FixedRateSimpleManager does the trick if you absolutely want to only ever have one physics step, which could be the case in performance heavy scenes in which the catch up manager would spiral out of control and worsen the situation by spending even more time than it should per frame due to the multiple stepping.

1 Like

Regarding the 0.02 value in SystemAPI.Time.fixedDeltaTime:
This is a legacy property which you should actually not use. I will bring it up with the team that it should be deprecated as mentioned on the function.

The value you should look at to get the actual time step used when your system is stepped is SystemAPI.Time.DeltaTime.
This will show the one you set.

1 Like