I have some questions for the use of NewtonTreeCollision with my voxel world ( minecraft-like game ).
I would like some clarification on the optimization process .
- Code: Select all
NewtonTreeCollisionEndBuild (tree , 1) ;
I noticed that for a simple cube ( 6 faces = 6 quads or 12 triangles, 8 vertices and 36 indices for the graphic part, 6 quad sent as geometry for NewtonTreeCollision ), NewtonTreeCollisionEndBuild takes about 8 milliseconds.
Finding that huge, I've quickly tested by disabling optimization : about 2 milliseconds on average.
But I do not know if optimization remains essential in case I know very well the faces to send to the NewtonTreeCollision ?!
Then just out of curiosity, I wonder how the engine create the final geometry for the following shape :

In my graphic part I have 2 quad and 8 vertices :

If I send these 2 quads to the NewtonTreeCollision, it remains the same with the optimization ? Or do we have this instead :

I ask this because if I can avoid optimization I do not know what I need to send in this case ^^ !
Finally, I need to know if NewtonTreeCollision is the right solution for my voxel world ? Because there is no function to remove faces and I often need to edit the blocks, and I don't really see how to apply the modification to NewtonTreeCollision effectively !
Thank you in advance for the answer! And sorry if some have seemed obvious, this is the first time I use a physics engine ^^ !