Only simulate physics on objects that are being rendered
Hi, is there a way to control which objects use physics when they are being rendered/are in the camera view because I have a big-ish 2D world but I also have 200+ meteorites flying around off the screen which are causing the game to lag but if there's less its way to barren. So I was wondering if I could make it so that only meteorites that are being rendered by the camera use physics?
Comment
You could check the distance to the player and if the meteor is outside the rendering distance of the camera, then you don't simulate it.