|
@@ -84,7 +84,7 @@
|
|
|
|
|
|
} else if ( camera instanceof THREE.OrthographicCamera ) {
|
|
|
|
|
|
- this.ray.origin.set( coords.x, coords.y, - 1 ).unproject( camera );
|
|
|
+ this.ray.origin.set( coords.x, coords.y, ( camera.near + camera.far ) / ( camera.near - camera.far ) ).unproject( camera ); // set origin in plane of camera
|
|
|
this.ray.direction.set( 0, 0, - 1 ).transformDirection( camera.matrixWorld );
|
|
|
|
|
|
} else {
|