In 0.51 the simulation rate could be modified by creating a ClientServerTickRate singleton and adjusting the Simulation rate.
Now if I set any value other than 60, the physics simulation seems to break (from not working at all at 72, to multiple errors for prediction errors at 30).
Is there anything else needed than creating the singleton to have a different simulation rate than the default 60?
Hi Occuros, thanks for reporting! I have managed to reproduce the issue where the rate is set above 60, but did not see the same issues when going below 60. Can you provide more info or perhaps report a bug through the editor so we can get the project to reproduce it?
Great, we’ve managed to find out why the bug is happening. PredictedFixedStepSimulationSystemGroup.RateManager.Timestep needs to be a multiple of the SimulationTickRate. So you can add a system that changes it, something like this:
if (TryGetSingletonEntity<ClientServerTickRate>(out var tickRateEntity))
{
var tickRate = EntityManager.GetComponentData<ClientServerTickRate>(tickRateEntity);
tickRate.ResolveDefaults();
World.GetExistingSystemManaged<PredictedFixedStepSimulationSystemGroup>().RateManager.Timestep = 1f / tickRate.SimulationTickRate;
}
We will fix this for the proper 1.0 release so this should not be necessary.