As a continuation to: Point one object to face a distant object
I'm trying to get a mesh's surface to point to another object. I want a far away object to point to a close object, whenever the far object moves.
Here is a sample of what is happening: http://jsfiddle.net/UsVUv/
1) I create 2 mesh objects. 2) Since the far mesh is facing up, I rotate it so that it can be seen from the camera. -> farMesh.rotation = new THREE.Vector3(Math.PI/2, 0, 0); 3) When the far mesh is moved, I call the following to get it to keep looking at the near mesh. The face of the far mesh does not look at the near mesh, but the edge of its plane does. -> farMesh.lookAt(nearMesh.position); 4) I then try to rotate the mesh back so it faces the camera again, but that removes the rotation that the lookAt did. -> farMesh.rotation = new THREE.Vector3(Math.PI/2, 0, 0);
You can comment out the lines 1), 2), and 3) in the sample to see what is happening.