How to rotate a cube vertically when the axis is unknown
Hello, I am new to Unity and have some problems with the object rotations. As you can see on the picture bellow the three green rays are the local axises of the cube. I want to rotate the cube for example by its vertical axis, ok I can use transform.up, but here is the trap. After many different rotations of the cube its axises change their place and the ray that points up may be is not transform.up, but transform.right or forward. So is there a way to rotate vertically or horizontally if I don't know the current place of XYZ axis?
Your answer
Follow this Question
Related Questions
Rotating in relation to touch X on screen 1 Answer
How to make a gameObject's Y rotation being another gameObjects' X rotation 1 Answer
Problems with limiting angles 1 Answer
Have enemy constantly try to get in front of player and push them back 0 Answers
Rotating Camera around Player's X-axis while rotating Player around its Y-axis (using mouse input) 0 Answers