mrdoob/three.js — Issue #1217: Mapping mouse cursor to object surface point
Author: nulpoet
Created: 2012-01-30 10:52:53+00:00
State: open

I am modifying the example https://github.com/mrdoob/three.js/blob/master/examples/canvas_geometry_earth.html.
I need to identify the point on the surface of sphere(co-ordinates relative to center of sphere) under cursor when mouse is clicked.
Is there any any standard way of implementing this ?

```javascript

function onDocumentMouseDown( event ) {
mouseX = ( event.clientX - windowHalfX );
mouseY = ( event.clientY - windowHalfY );

// TODO : get co-ordinates of point clicked relative to centre of sphere

}

```