I am using OrthographicCamera and a simple PlaneBufferGeometry( 300, 500 ) that gets rotated. I am using the code below but regardless of where I mouse click, it never intersects. I have tried everything I can think of but still cannot get it to work.
Here is my code:
var vector = new THREE.Vector3( );
var raycaster = new THREE.Raycaster();
var dir = new THREE.Vector3();
vector.set( ( event.clientX / $(container).width() ) * 2 - 1, - ( event.clientY / $(container).height() ) * 2 + 1, - 1 ); // z = - 1 important!
vector.unproject( camera );
dir.set( 0, 0, - 1 ).transformDirection( camera.matrixWorld );
raycaster.set( vector, dir );
var intersects = raycaster.intersectObjects( objects, true );
Any suggestions would be greatly appreciated