I’m writing my own gravity simulator and at ‘real time’ (?) it appears to work fine and is relatively accurate. However is incredibly slow, too slow for a game anyway.
I’ve tried adjusting the Timescale, and whether it is set to 1 or 100 the simulation remains the same. This is whether I change it via the Edit->Project Settings-> Time menu, or in an Update() function via public float variable.
My gravity calculations are executed within Update() function, but utilise Time.fixedDeltaTime (using Time.deltaTime makes it horribly inaccurate - and again no change in speed either when I tried it).
The only way I’ve found to increase the speed is to manually calculate faster speeds, which also means I have to increase gravity. But again that results in less accurate results.
Any idea why Timescale doesn’t seem to be working? Alternatively, does anyone have any reliable/accurate examples of gravity simulators (packages, classes, code snippets etc) that can be sped up / slowed down easily?
For the record I’m using Unity 2021.3.2f1