Question

In order to know the current front face of a rotating cube I created a raycaster telling me which part of the cube intersects with it. So far I do not get any intersections although I think I did everything correct.

How can this be solved?

Thanks

Was it helpful?

Solution

You need to have your raycaster's ray point toward the object.

//var projector = new THREE.Projector(); 
var vector = cube.position.clone(); // new THREE.Vector3(100, 100, 0.5);
//projector.unprojectVector(vector, camera);

fiddle: http://jsfiddle.net/an86j/19/

Note: This question is not likely to be of use to anyone else but you, and that is not the purpose of this site. Try to ask questions that will be beneficial to others. See the faq.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top