Cylinder geometry axis in a new system?

I am facing a bit of a dilemma with this problem. As you can see in the image, I am using CylinderGeometry() to render a cylinder in my 3-D global space. Cylinders are always initially positioned at the origin and oriented such that the axis along the length of the cylinder is the positive Y axis. What I want is to transform this cylinder to a different location and for that I have the y-axis at the new location (1,0,0) for example as shown in the image.

How can I get the new x- and z- axes after rotation ? I want my new z-axis such that if the new y-axis is coming out of the computer screen, then the new z-axis must be pointing towards the right of the screen (and correspondingly the x-axis will point up but getting just the z should be enough for this).

Now the other issue is that I don’t want this z to change when i rotate the screen about the new y axis. That is, in this example, clearly the new z axis is the negative z (0,0,-1). I want it to still remain 0,0,-1 if i rotate the screen.

Is it possible to solve this or am I missing some info?

1 Like

Not sure I fully followed your question but would changing the default XYZ make things any easier?

Maybe something like:
THREE.Object3D.DefaultUp = new THREE.Vector3(0,0,1);

1 Like