Pergunta

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

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top