Heya!
I’m working on a game atm and when I change the resolution during runtime it breaks the physics.
I can push the stone around fine while playing at 1440p but if I change my resolution to lower or change the resolution scale to lower it breaks the physics and I cant push it, it hardly moves.
I found this while a friend testing my game while playing on a lower resolution then me.
Any help is appreaciated!
Multiplying things by delta time is important.
1 Like
Going off what Bits360 said, the problem isn’t the resolution directly: it’s the framerate. The physics simulation is dependent on framerate, so when you change your resolution to something lower, the framerate increases and more physics steps can be done in a smaller time frame, which makes the simulation more stable & accurate. So if you want the physics simulation to be consistent between resolutions & framerates, you’re going to have to either do what Bits360 said, or you can use Physics Sub-Stepping, which divides the frame up into fixed steps. It’s is an experimental feature, though, but I’ve used it before.
1 Like
Thanks for the answers!
Yeah I figured it had to do something with the FPS increasing, so I capped the FPS at 120 for now to make a quickfix for it.
I’ll have to recheck into delta time… remember I used it when coding in the Unity environment.
Multiply distance moved by delta time. Ez fix.