I am attempting to identify clicks on my Plane mesh. I have established a raycaster using provided examples as instructions.
Below is the code snippet: http://jsfiddle.net/BAR24/o24eexo4/2/
Clicks made below the marker line do not register, even if they are within the plane (the marker line does not affect it).
Additionally, try resizing the screen. In such cases, even clicks above the marker line might not have the desired outcome.
Could this issue be related to the use of an orthographic camera? Or maybe an update to a necessary matrix is missing?
function onMouseDown(event) {
event.preventDefault();
mouse.x = (event.clientX / window.innerWidth) * 2 - 1;
mouse.y = -(event.clientY / window.innerHeight) * 2 + 1;
raycaster.setFromCamera(mouse, camera)
var intersects = raycaster.intersectObjects(objects);
if (intersects.length > 0) {
console.log("touched:" + intersects[0]);
} else {
console.log("not touched");
}
}