Search Unity

Sphere with Latitude Longitude positions

Discussion in 'Made With Unity' started by mgear, Dec 14, 2010.

  1. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,435
    hi,

    Test project..

    Sphere (earth), with latitude longitude positions.
    (Texture is just thrown in there and sphere is rotated 197' to get roughly correct positions,
    tested few cities atleast)

    Maybe could use this with GeoIP, News location plotting, Weather news plotter,
    GPS data, Twitter, GoogleMaps api etc..?

    *Code for the math stuff is taken from here:
    http://www.actionscript.org/forums/showthread.php3?p=722957#post722957
    Texture from nasa images (said to be public domain / no copyright)

    Webplayer:
    http://unitycoder.com/blog/2011/08/09/latitude-longitude-on-3d-sphere/
    Demo location is set at London (lat 51.50015, long -0.1262362)
    (mouse orbit)

    Download:
     

    Attached Files:

    Last edited: Aug 8, 2011
  2. jain_yuvraj

    jain_yuvraj

    Joined:
    Jul 1, 2011
    Posts:
    3
    Hello mgear,

    Can you help me for the same things.
    Currently I had developed a project for the earth in that project I had used one camera, sphere(earth) and created two scripts using javascript for the rotation and zoom in zoom out of the earth, now the question is how can I find the x,y,z position of the earth while user click on the particular location, after getting this points I will going to convert that points into langitudes and latitudes and then fetch the maps according to that location, but currently i was not able to find the x,y,z positions on the earth.
    Can you please focus on the same.
     
  3. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,435
  4. subjectZero

    subjectZero

    Joined:
    Oct 19, 2014
    Posts:
    37
    Thank you so much for this. this is exactly what i was looking for my new project!!!!

    your a rock star!!!!
     
  5. blueinc1

    blueinc1

    Joined:
    Mar 21, 2013
    Posts:
    3
  6. DevSpur

    DevSpur

    Joined:
    Jul 19, 2014
    Posts:
    20
    Hi there I'm looking to make a app like uber to place cars on a map I'm using map box for my map all I want to do is take gps and convert them to x y to place a car in the scene so my question is how can I I convert gps coordinates to x y z (numbers) so I can move the car to those (numbers) so if I can have help it will be great or if someone can point me in the right direction that would be great as well
     
  7. Frednaar

    Frednaar

    Joined:
    Apr 18, 2010
    Posts:
    153
    Mapbox unity should have the conversion methods if I remember well...