I am looking for a way to get the Euler Angle necessary to get from one Vector3 to another.
You can rotate a Vector3 using
let vector_negZ = new THREE.Vector3(0,0,-1);
let rotation = new THREE.Euler(pitch,yaw,0,"ZYX")
let vector_rotated = vector_negZ.applyEuler(rotation);
In this instance the starting vector (vector_negZ) and the Euler angle are given.
Looking at the Euler and Vector3 documentation I could not find any function that takes a starting vector and the rotated vector and gives you the Euler between these two vectors. There is Euler.setFromVector3 but this function just sets the Euler x y and z based on the Vector3’s components.
TLDR: Is there something like this?
let rotation = new THREE.Euler().setFromTwoVectors(beginningVector,rotatedVector,eulerOrder);