public void Locate(GameObject obj, LatLonH loc)
    {
        // decrease the numbers to prevent floating precision limit error

        float latdif = (loc.getLatitude() - currentLocation.latitude) * 100;
        float londif = (loc.getLongitude() - currentLocation.longitude) * 100;
        float altdif = (loc.getAltitude() - currentLocation.altitude) * 1;

        Vector diff = new Vector(londif, altdif, latdif);

        obj.transform.position = diff.toVector3();
        //Debug.Log("Object Name: " + obj.name + "Pos: " + obj.transform.position);
    }
Ejemplo n.º 2
0
 public LoadInfo(string n, LatLonH l, string cat)
 {
     name     = n;
     location = l;
     category = cat;
 }