I have a large-scale physics based game I’m working on and I’d like to know if it’s possible to toggle an object’s physics if it’s more than 500~ units away. A big world can’t simulate physics everywhere, all the time, and stuff that’s over two screens away doesn’t need to be rendered. How do I toggle physics on/off?
You could probably toggle that if you determine an object is offscreen and of no importance to the scene
It stops the physics movement, but it’s still sucking up the processing power
Any way to disable the rigidbody component altogether?
Hmmm Well, i’m not too familiar with physics, but have you tried putting them to sleep? Not for sure if you can, but the docs are here:
Either that, or you could simply destory the rigidbod component. this might be what you need if you no longer need the object to react to physics.