Objects culling

Two questions I have:)

1) is it possible to forbid update of objects outside of an AABB? (ie I want to update only objects which are visible). Or is it enough not to apply forces to them and let them sleep? (looking at performance)

2) is it possible to set LevelOfDetail to objects? Well, I don't think it is because I didn't find it in source codes, but do you plan to add it in the future? Maybe setting lower iterations (for the solver) to individual objects could do the job?
1) No, but you can try putting those bodies to sleep. Better yet remove them from the world using b2World::DestroyBody.

2) Nope. I don't even know what this would mean. Such things would be up to the application.
@Erin
He means that bodies further away would use less accurate physics to increase speed while still showing accurate physics where the viewer is looking 😛
Diggsey wrote:
@Erin
He means that bodies further away would use less accurate physics to increase speed while still showing accurate physics where the viewer is looking 😛


Yes:)
The best way to do that is by saving/loading the physics entities as needed. This is also true for rendering.

For example, if you have a side scroller then don't keep stuff more than 2 screens away.

Original thread: https://box2d.org/forum/viewtopic.php?t=292