Closed CrazyWords1 closed 3 months ago
The Minecraft worlds I've seen were composed of thousands of equal-sized, axis-aligned, cubes arranged in a grid.
You describe a model composed of 10-to-1000 cubes or boxes. However, "cube" is a special case of "box", not a synonym, so immediately there's some confusion and uncertainty.
The shape depicted consists of 8 boxes (not 10-to-1000, not cubes) of varying sizes (not equal-sized) and varying orientations (not axis-aligned). My confusion intensifies.
Because the discrepancies between my understanding of Minecraft, your words, and your picture, I'm not 100% confident I understand you're asking about.
For the pyramid depicted, a compound of 8 box collision shapes, such as you supposed, seems a good choice. The other collision shape to consider (assuming the pyramid does not move) would be MeshCollisionShape
. Without testing them both in a realistic setting, I can't predict which shape would perform better.
For worlds composed of thousands of equal-sized, axis-aligned, cubes arranged in a grid, further optimizations are possible.
I made a mistake when I equated cubes with “boxes.” I realize I may have misled you, let me try to explain what I mean.
The world of minecraft itself is really made up of “cubes”, they are all the same size.
Also, in minecraft there is a possibility to add your own entities (models), they consist of “boxes”, these boxes with different turns, and sizes. The model described in pyramid.json, is not a block in the usual sense of Minecraft, it is an additional model (entity) that can be spawned in the game world.
When I talked about 10 - 1000 cubes, I meant the boxes that usually make up a model (like pyramid.json).
Does the pyramid entity move, or is it fixed in place?
Yes, in my case, entities can moves
For the entity depicted, a compound of 8 box collision shapes, such as you supposed, seems the best choice.
For the entity depicted, a compound of 8 box collision shapes, such as you supposed, seems the best choice.
Thanks for your replies, it was a pleasure to chat, I think this issue can be closed
I need some advice.
I use bullet for my minecraft server, models use the original format which is written in .json, models consist of cubes (box).
What form of collision do you recommend? I suppose CompoundCollisionShape[...BoxCollisionShapes], can I be right?
There are usually 10 to 1000 cubes in these models.
P.S ( I will provide a screenshot and .json file of the test model for you )
MODEL File -> pyramid.json![изображение](https://github.com/stephengold/Libbulletjme/assets/32343185/c3dcde05-5f3f-4b82-a046-d7856f52c4ef)