Geometry Batching (previously known as Geometry Instancing)

The MeshCollisionShape works for terrain, which is definitely isn’t closed. So I don’t understand the issue.

I wonder if it will be faster to use some kind of “filling” algorithm that will create larger cubes out of smaller ones, and then create a CompoundCollisionShape out of them?

It takes ages to compute the CollisionShapes for the batchs.

I also thought about making large cubes out of the small cubes, but i couldnt think of any good algorithm that would manage to do this in a reasonable amount of time.

I think you should create a CompoundCollisionShape of MeshShapes made of the single meshes in the batch. A very large and complex collision shape will inevitably result in large and complex computations for collision checks.

Just a thought; If it’s just simple (player and object ) gravity you’re after (ie, things fall to the ground), and not full physics simulations (things tip over, slide, etc) , there are simpler ways of achieving it. For example using a Ray to see if the player is close enough to the ground and making him accelerate downwards, if not.

There is also the issue of not running though objects though.



Do physics object have to be tied to real objects? If not perhaps it’s possible to build a small physic’s sphere or cube around you containing physics objects for just the items in your vicinity, and keep rebuilding that as you move around. This physics cube can then be smaller than the geometry batches.