exact point on a rotating sphere

Posted by nkint on Game Development See other posts from Game Development or by nkint
Published on 2011-03-06T19:35:07Z Indexed on 2011/03/07 16:19 UTC
Read the original article Hit count: 240

Filed under:

I have a sphere that represents the Earth textured with real pictures. It's rotating around the x axis, and when user click down it has to show me the exact place he clicked on. For example if he clicked on Singapore the system should be able to:

  • understand that user clicked on the sphere (OK, I'll do it with unProject)
  • understand where user clicked on the sphere (ray-sphere collision?) and take into account the rotation
  • transform sphere-coordinate to some coordinate system good for some web-api service
  • ask to api (OK, this is the simpler thing for me ;-)

some advice?

© Game Development or respective owner

Related posts about geometry