Compound collision bounds or individual collision bounds for every object?
Does anyone know which one is better for performance?
I’m working on a level editor, where every static object spawned are grouped into segments.
Should I apply compound collision bounds for the individual segments or leave every object with individual collision bounds?
Group objects collision that are all close together and it may provide a little boost in physics calculations speed, but for the most part you just want to ensure that objects ignore each other that are static using Collison layers, also avoid very large triangle mesh, many small meshes in a grid are cheaper to raycast against, however bloat the scene graph a bit.
It’s all a balancing act
So I should change the collision layers if, for example, two static objects are intersecting?
Does that really matter? Does the collision still occur even if there is no event in code for it to happen?
Yeah, static objects that overlap still collide
Just have all the objects ignore their own collision layer, but collide with every other layer
Does that help a lot with performance?
For example, if I had a hundred static objects that are overlapping the ground.
Setting them to have a different collision layer than the ground. Would that help a lot?