justposting the code here as i dont need it:
Code: Select all
for(int i=0;i<=10;i++)
{
for(int j=0;j<=10;j++)
{
for(int z=0;z<=10;z++)
{//((i*((z%2)*1.5)))
ISceneNode*tile=smgr->addSphereSceneNode(10);
tile->setPosition(core::vector3df(((i+((z%2)*0.5)))*(0.88)*20,((j+((z%2)*0.5))-((i%2)/2.0))*20,z*(0.88)*20));
tile->setMaterialFlag(EMF_LIGHTING, false);
// tile->setMaterialTexture( 0, driver->getTexture("tile.jpg") );
}}}
sofor x=1,y=1 the third loop makes all tiles in z axis in x=1,y=1
then x=2,y=2 and so on....
this is known in any 3d tile mapconstruction or even can be understood from 2d tile maps which are allover the net...
anyway the 2nd thing is the constant numbers found here:
Code: Select all
core::vector3df(((i+((z%2)*0.5)))*(0.88)*20,((j+((z%2)*0.5))-((i%2)/2.0))*20,z*(0.88)*20));so thats all !!