Getting clicked point location on a rotating sphere

I am trying to get the correct point location on a sphere when a user clicks on it, as long as the sphere doesn’t rotate I am getting the correct x,y,z coordinates. But when the sphere rotates, the sphere raycaster clicked point doesn’t take back into account by how much the sphere got rotated by. In my fiddle example, the x-axis rotates, when you click on the sphere the point will be offset. The y-axis point location comes up right as it doesn’t rotate. What am I missing?

clickSpherePoint.position.copy(sphere.worldToLocal(target.point)); // target.point now is in local coordinates

Point of intersection is in world coordinates. So you have to transform this point to the local coordinates of the sphere.

1 Like

That works, awesome thank you, I owe you one :slightly_smiling_face: