I’ve made a few cards using @Dragosha’s script (see Why is label invisible when rotated between 270 and 360? (SOLVED) ) and a factory which works fine, if the z index of the main card objects are a whole number.
However since I am using a perspective rendercam camera moving objects on the z axis will make them bigger, so if I have a lot of cards the card on the right will be somewhat bigger than the card on the left. Therefore I decided to reduce the z coordinate of every card by dividing the number by ten. This included the card game objects and every object inside the card as well. So my card’s z went from 1 to 0.1 and the text inside went from 0.5 to 0.05 and so on. This unfortunately causes a z order war, but I can’t understand why (z order is not always consistent between renders).
collectionfactory.create('/camp1#cards', vmath.vector3(-100, 0, 0.1), nil, nil, size)
collectionfactory.create('/camp1#cards', vmath.vector3(0, 0, 0.2), nil, nil, size)
collectionfactory.create('/camp1#cards', vmath.vector3(100, 0, 0.3), nil, nil, size)
collectionfactory.create('/camp1#cards', vmath.vector3(120, 0, 0.4), nil, nil, size)
(The table in the background has a negative z coordinate)
Thanks for the help