I am making a scrabble type game in Unity 3D and I am having a problem rotating the tiles. When I instatiate them onto the tile rack I rotate them on the x-axis to the correct angle for the rack using the following code:
transform.rotation = Quaternion.Euler(new Vector3(-63, rot.y, rot.z));
This works fine and if I put a value of 0 in for the x rotation at this point the tile appears parallel to the board, as expected. The problem is that when I try to rotate them back to zero after the -63 rotation they end up at an angle that looks like about 330 (or -30). To get it to something that looks near zero I have to enter a figure of 14, which I can work with, I would just like to understand why I have to do this. Any help would be appreciated!