- Home /
Custom map with GPS
I want to make a custom 3d map of a city and have a GPS beacon indicating the user's location within the map. Is this possible in Unity?
Answer by CC Inc · Aug 02, 2012 at 07:05 PM
From here:
"you make a camera, go into "game" tab (next to "scene") and set the position of the camera (i put it in the upper right corner). next, put it up REALLY high up on top of your player and set the projection to orthographic. now make a c# script that will make the camera follow your player. heres the script i used:
using UnityEngine;
public class CameraFollow : MonoBehaviour {
public Transform Target;
void LateUpdate()
{
transform.position = new Vector3(Target.position.x, transform.position.y, Target.position.z);
}
}
then, set your player as the target."
I know this has been ages and thanks for the answer. I should have made it clear I am writing this for the iPhone and using the iPhone GPS. What I'm trying to do is basically create a map and show your location on that map based on GPS coordinates. So if my map was a bunch of objects that represent the houses in my neighbourhood, I'd like to use the iPhone GPS to deter$$anonymous$$e your location in world coordinates and use this to show your location on the map.
Not a perfect match, but you might be interested in this:
http://wiki.unity3d.com/index.php/OpenStreet$$anonymous$$ap_for_unity_iPhone
Answer by mthicke2 · Aug 22, 2012 at 04:13 AM
I understand that will make a camera follow a character from a 3rd person perspective. What I am trying to do is use your current GPS position to locate you on a map - the map in this case not being a Google map but a map I have created.
Answer by ejjht · May 18 at 03:51 AM
I also want to match a custom map to world coordinates, does anyone know how to achieve this ?