I have searched around for an answer to this question and found two answers which are either old or do not have THREE related code.
What I want to happen is have the clicked point be pointing toward the camera!
if (intersects.length > 0) {
var point = intersects[0].point;
//console.log(point);
var a = new THREE.Vector3(0,0,1);
var b = point.normalize();
var rotationAxis = new THREE.Vector3(0, 0, 0);
rotationAxis.crossVectors(b, a);
var dot = a.dot(b);
var angle = Math.acos(dot);
var quaternion = new THREE.Quaternion();
var dest = quaternion.setFromAxisAngle(rotationAxis, angle);
sphere.setRotationFromQuaternion(dest);
}
UPDATE:
I have been trying to convert the math from the first answer to threejs, it's almost going to the right place but out by some degrees, where am I going wrong?