I'm trying to monitor GPS location and compass heading (using the Unity Enhancement Park) as frequently as possible. However, the values are not updating in either the Editor or on iPhone the way I've got my Update() function working (below). The two sets of read-outs are wildly different.
Any suggestions on how to repeatedly check location?
Thanks
.M.
function Update () { // User denied access to device location heading = 0; if (PlayerPrefs.GetFloat("sb_trueHeading") != 0) heading = PlayerPrefs.GetFloat("sb_trueHeading"); // User denied access to device location if (iPhoneSettings.locationServiceStatus == LocationServiceStatus.Failed) { result = "User denied access to device location"; return; } // Access granted and location value could be retrieved else { result = "Location: " + iPhoneInput.lastLocation.latitude + " " + "Longitude: " + iPhoneInput.lastLocation.longitude + " " + "Altitude: " + iPhoneInput.lastLocation.altitude + " " + "HorizontalAccuracy: " + iPhoneInput.lastLocation.horizontalAccuracy + " " + "VerticalAccuracy: " + iPhoneInput.lastLocation.verticalAccuracy + " " + "Timestamp: " + iPhoneInput.lastLocation.timestamp + " " + "Compass: " + heading; } }