I’m afraid two normalized vectors are no valid input for a rotation. Given a single normalized vector and an angle, you can use the axis-angle representation in order to perform a rotation. The methods for this use case are:
@selmernoid, it might help if you were clearer how you expect the rotation to work. Are you trying to rotate around the normal vector? In that case you don’t need a directional vector, you just need a scalar value, since if you’re rotating around an axis the only question is if you’re rotating “left hand curl” or “right hand curl” where your thumb is the normal, and by how much.
Can you maybe draw a picture of what you’re trying to achieve geometrically?
Ahh, cool, so it sounds like you want your Object3D to point one axis in the direction of the direction vector and a different axis in the direction of the normal vector. I’m not quite sure which axis you want to point towards which vector, but that doesn’t matter: once you’ve pointed any pair of axes toward the two vectors it should be easy to change them however you want with 90-degree rotations.
The other trick is I assume we can’t assume the two vectors are at a 90-degree angle to each other, which is fine.
The way you usually do that kind of orientation in Three.js is through the lookAt method together with the up vector. You could start by trying
Not sure that’ll get you what you want though. lookAt points to a vector in world space, in other words if your vector is say (0, 1, 0) then instead of “looking straight up” your object will turn and look at a position 1 above the origin. So you can try making the lookAt point relative to your object:
myObj.up.copy(myNormalVector);
var adjustedDirVector = myObj.localToWorld(myScratchVector.set(0, 0, 0)).add(myDirectionVector);
myObj.lookAt(adjustedDirVector);