THREE.js Noob here.
I have a mesh that I want to rotate by selecting on one of its faces. Basically, I want to click on a face, and apply rotations to the mesh so that the face I clicked on faces the plane that the mesh is currently sitting on.
Here is a visualization of my problem:
I want to click on a face (the yellow triangle) and rotate the mesh so that the yellow triangle faces the plane that the mesh is currently sitting on. I do have normal vector of the face (i.e., myVector
) and I want to apply rotations so that the normal vector would equal targetVector
after.
I would like to find out how much I would have to rotate the mesh in EACH axis separately in order to achieve my goal.
Thank you in advance and please ask me if you require any more information!