I want to rotate the X and Y axis like in the following picture:
Scenario is like this:
!! In this scenario the Z axis is the 3D up and down axis and does not server any importance !!
At the start of the scene you are a 3D character looking at Y. You can move left and right along the X axis with the following code:
camera.position.x += 1; OR camera.position.x -= 1;
You can also turn your camera and look towards another point. This will be point Y1 in picture 2. I rotate the camera object via the following code:
camera.rotation.z += 1; OR camera.rotation.z -= 1; //Normally Z is Y.
Now when you try to move along the X axis, you will still move along the original X1 axis instead of the new X2 axis.
My question is, how do I make the object move along the new X2 axis instead of the old original X1 axis?