I need to pause my game from time to time, which I do by setting the timescale to a very low value. However, and here’s the major problem: I would like to still run some physics simulations during the pause!
Nice one - right?
Basically, that means that the traditional way of setting timescale to slow things down is out the window. The question is - is there another way? Is there some way for me to make an object NOT continue to take the rigidbody into account, and then be able to “switch it back on” and let it pick up where it was?
I haven’t started experimenting yet, but I thought I’d throw the question out there. Any ideas?
i suppose you could isKinematic = true to everything physics based you want paused - though i imagine you’d have to store the velocity as a variable to retain any movement when you want them to start up again - though i don’t think it would be precise enough if your gameplay counts on that.
If you do that, you may want to store each objects velocity before you make it kinematic for when you reactivate them. I am not sure if the velocity gets reset when you go from active to kinematic back to active, so when you disable pause, they might all just drop. Worth testing.