• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Android flipping the way numbers go? gps my mind is blown help

D

Dengar

Guest
im working on a gps game and im fundamentally stumped on something im sure is simple.
gps latitude coordinates are positive above 0 and negative below it.
ingame y coordinates are negative above 0 and positive below it.

the below formula calculates the offset from the center object to show ingame where u are in relation to the central object. it works perfect for longitude/x coordinates, but because latitude/y coordinates are diferent in shows things backwards ie south is north and up is down. but im stumped on how to correct it.
Code:
nyy = y + (( latitude_new -  latitude_center)*32);
any and all thoughts and help welcome
 
Last edited by a moderator:
I'm not sure I follow exactly, but what about inverting the latitude or y before doing calculations
so, temp_latitude = -latitude;

would that work?
 
Top