I have a player and I know how to make him move. I have a GPS script that finds the coordinates of the device. But, I cannot figure out how to move the Character with the GPS coordinates (latitude and longitude).
How do you want it to move? According to the movement of the phone in the real world? If there is no function for that, keep track of the gps-movement yourself and calculate a movement vector (each frame or every couple frames /seconds, i believe GPS was battery intensive?). Then apply that same movement to your ingame character.
Yes, Thank you. I just need help converting the movement of the phone to movement of the character. I can track the GPS coordinates but, I don’t understand how to decide which direction the phone is moving, and making him move according to it. For example, Pokemon Go. I have a map, I have a character, I have GPS coordinates (latitude and Longitude), I know how to make him move. I just need to convert the latitude and longitude to a north, south, east, and west Movement direction. If you could please show me an example script on how I could (on update call) move him according to the phones phones movement. I can convert the latitude and longitude to the games coordinates myself.
If you store the last GPS position, then on the next update…
(oldGPS - newGPS).normalized will give you the vector direction.
Thank you Cyber-Dog!!!
That is super helpful. That is what I was looking for.
Glad I could help