The polyhedra from the collection are built from pre-computed data coming from an external source. This computation doesn’t necesseraly align the shape axes with the world axes.
Playing around with the hexagon prism (the easy one), found the angle to to Y axis, rotated so local y axis matches, and baked transformation. Scaling is OK but x and z swapped. Much more of a problem with other polyhedra.
Hmm yeah I could use axis aligned polyhedra as well. At least for all predefined ones.
I used to work with them from another 3D editor. And scale them at free will into their axis aligned directions. I find all these basic shapes great for creating complex meshes just like building starwing fighters from LEGO bricks.
But the tilted polyhedra from BABYLON.MeshBuilder.CreatePolyhedron have been a fight for finding math angles so far for me, I could write a whole kindergarten match-the-shape game about it…