# Handling image rotation

I have a cube which is made up of 6 quads. This was to facilitate having a different image on each side. The images on each side are not symmetrical. I mean unlike a die, as you rotate the cube depending on how the cube has been rotated, the face in the front may not always have the top of the image facing the world up. Is there anything I could do so that the top of the image is always facing the world up at least for the front face?

Thanks,
Syed

I’m a little confused on exactly what you’re trying to accomplish.

You want to rotate a specific quad to always be up? Won’t that break your cube? Or do you want to rotate only the texture?

I want to just rotate the texture only otherwise the cube will break, so depending on which one of the 6 positions the quad is, the texture would face upwards in that direction. Hope this clarifies.

Thanks,
Syed

I’m a bit confused also, you might have to give us a screenshot and explanation of the game to figure out what your doing. If your looking for the texture on the cube to not rotate with the cube, then you would just need a texture applied to the cube with texture coordinates set to world space.

Well if you just want to have “a different image on each side” you can just create an empty GameObject, give it 6 quads as children (with different images on them) and treat it as a normal cube.

Sorry for not being clear enough. I have an empty game object to which I will parent 6 child quads / sprites dynamically. Initially the quads and the textures are all set up properly but as you rotate the cube, the rotation of the quads changes and depending on the cycle of rotations you put them through the texture might end up upside down after a series of rotations. If there is a straightforward solution I will try it out, otherwise I am thinking it might be easier to have symmetrical textures like a sphere / pentagon etc so no matter which way the quad is rotated, there is no top or bottom.

What I meant above was that when I rotate the cube, the quads rotate anyway since they form the cube. I was wondering what additional compensation I need to apply to the texture itself to make sure it has its top facing upwards. Attached is the diamond shape which will have 6 different colors for the 6 faces of the cubes. It has the apex at the top and the glow at the base. As you can see, it is very easy for it to be side facing or upside down after a couple of rotations of the cube, considering you will be able to rotate the cube in any direction 1 face at a time (up, down, left, right)

Thanks,
Syed

Apologies. I’m still not quite sure whats going on. Can you describe what the game is about, and what the diamond in the game serves. How come its critical that the texture remains a certain way when the diamond is rotating?

Your mentioning a cube that is made of six quads (six sides, correct?). But your showing us a diamond. Does the diamond have 6 sides?

Sorry, I meant the diamond is the texture that will be applied to the 6 faces. One of each color for each face.

Thanks,
Syed

So the diamond is not a model but the texture that will be applied to a box? Err, now I’m more confused :).

It would help if you explain what the game is about and whats going on in the scene. Can we get a screenshot of the box that the texture will be applied to?