<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Infinity Code Forum — Camara Orbit Tremling]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=2323</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2323&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Camara Orbit Tremling.]]></description>
		<lastBuildDate>Mon, 04 Nov 2024 22:07:33 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Camara Orbit Tremling]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9711#p9711</link>
			<description><![CDATA[<p>What are the origin and destination values?</p><p>Unfortunately, I didn&#039;t understand this:<br /></p><div class="quotebox"><blockquote><p>and here i more 1 problem the LocationMarker doesn&#039;t present on the map !!!! ??<br />you suggest to replace the map with another map ?</p></blockquote></div><p>Please rephrase it.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 04 Nov 2024 22:07:33 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9711#p9711</guid>
		</item>
		<item>
			<title><![CDATA[Re: Camara Orbit Tremling]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9710#p9710</link>
			<description><![CDATA[<p>/*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INFINITY CODE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/<br />/*&nbsp; &nbsp;<a href="https://infinity-code.com">https://infinity-code.com</a>&nbsp; &nbsp;*/</p><p>using UnityEngine;<br />using UnityEngine.EventSystems;<br />using UnityEngine.UI;</p><p>namespace InfinityCode.OnlineMapsDemos<br />{<br />&nbsp; &nbsp; [AddComponentMenu(&quot;Infinity Code/Online Maps/Demos/Search Panel&quot;)]<br />&nbsp; &nbsp; public class SearchPanel:MonoBehaviour<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; public GameObject MapHald;<br />&nbsp; &nbsp; &nbsp; &nbsp; private Button itemButton;<br />&nbsp; &nbsp; &nbsp; &nbsp; private Transform firstItem;<br />&nbsp; &nbsp; &nbsp; &nbsp; public string googleAPIKey= &quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; /// (Optional) Reference to the map. If not specified, the current instance will be used.<br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;/summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; public OnlineMaps map;<br />&nbsp; &nbsp; &nbsp; &nbsp; public GameObject scrollViewSearchHandlr;<br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; /// Reference to the input field.<br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;/summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; public InputField inputField;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; /// Indicates whether to use autocomplete.<br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;/summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; public bool useAutocomplete = false;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; /// Reference to the autocomplete container.<br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;/summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; public RectTransform autocompleteContainer;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; /// Reference to the autocomplete item prefab.<br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;/summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; public GameObject autocompleteItemPrefab;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; /// Marker that shows the search result on the map.<br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;/summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; private OnlineMapsMarker marker;<br />&nbsp; &nbsp; &nbsp; &nbsp; private OnlineMapsGoogleGeocodingResult[] LatteryResults;<br />&nbsp; &nbsp; &nbsp; &nbsp; public int Index_Result_Selected=-1;<br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; /// Hides the autocomplete container if the mouse is not over it.<br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;/summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; private void HideAutocomplete()<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!useAutocomplete) return;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (autocompleteContainer == null) return;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (RectTransformUtility.RectangleContainsScreenPoint(autocompleteContainer, OnlineMapsInput.mousePosition)) return;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (autocompleteContainer != null) autocompleteContainer.gameObject.SetActive(false);<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; /// This method is called when the autocomplete request is completed.<br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;/summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;param name=&quot;response&quot;&gt;Response string&lt;/param&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; private void OnAutocompleteComplete(string response)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (autocompleteContainer == null || autocompleteItemPrefab == null) return;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsGooglePlacesAutocompleteResult[] results = OnlineMapsGooglePlacesAutocomplete.GetResults(response);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (results == null || results.Length == 0)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; autocompleteContainer.gameObject.SetActive(false);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; autocompleteContainer.gameObject.SetActive(true);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foreach (Transform t in autocompleteContainer) Destroy(t.gameObject);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; float y = 0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foreach (OnlineMapsGooglePlacesAutocompleteResult result in results)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GameObject item = Instantiate(autocompleteItemPrefab);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; item.transform.SetParent(autocompleteContainer, false);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; item.GetComponentInChildren&lt;Text&gt;().text = result.description;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; item.GetComponentInChildren&lt;Button&gt;().onClick.AddListener(() =&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; inputField.text = result.description;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Search();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; inputField.ActivateInputField();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; });<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RectTransform rectTransform = item.GetComponent&lt;RectTransform&gt;();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rectTransform.anchoredPosition = new Vector2(0, -y);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; y += rectTransform.rect.height;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RectTransform containerRectTransform = autocompleteContainer.GetComponent&lt;RectTransform&gt;();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; containerRectTransform.sizeDelta = new Vector2(containerRectTransform.sizeDelta.x, y);<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; /// This method is called when the geocoding request is completed.<br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;/summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;param name=&quot;response&quot;&gt;Response string&lt;/param&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; private void OnGeocodingComplete(string response)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsGoogleGeocodingResult[] results = OnlineMapsGoogleGeocoding.GetResults(response);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (results == null || results.Length == 0)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(response);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetResultInScrollView(results);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //OnlineMapsGoogleGeocodingResult r = results[0];<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //map.position = r.geometry_location;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Vector2 center;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //int zoom;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //OnlineMapsUtils.GetCenterPointAndZoom(new[] { r.geometry_bounds_northeast, r.geometry_bounds_southwest }, out center, out zoom);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //map.zoom = zoom;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //if (marker == null) marker = OnlineMapsMarkerManager.CreateItem(r.geometry_location, r.formatted_address);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //{<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; &nbsp; marker.position = r.geometry_location;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //&nbsp; &nbsp; marker.label = r.formatted_address;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //}<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; private void SetResultInScrollView(OnlineMapsGoogleGeocodingResult[] results)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int index = 0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int resultCount = results.Length;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (resultCount == 0) return;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LatteryResults = results;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foreach (OnlineMapsGoogleGeocodingResult res in results)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GameObject go= Instantiate(autocompleteItemPrefab, autocompleteContainer);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Text[] textChildren = go.GetComponentsInChildren&lt;Text&gt;();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; textChildren[0].text = res.formatted_address;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; textChildren[1].text = res.geometry_location.ToString();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; textChildren[2].text = index.ToString();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; index++;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; firstItem = go.transform.GetChild(2);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; itemButton = firstItem.GetComponent&lt;Button&gt;();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; itemButton.onClick.AddListener(() =&gt; OnItemButtonClicked(go));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; void OnItemButtonClicked(GameObject item)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;index: &quot; + int.Parse(item.transform.GetChild(3).GetComponentInChildren&lt;Text&gt;().text));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int ind=int.Parse( item.transform.GetChild(3).GetComponentInChildren&lt;Text&gt;().text);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsGoogleGeocodingResult r = LatteryResults[ind];<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map.position = r.geometry_location;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Vector2 center;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int zoom;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsUtils.GetCenterPointAndZoom(new[] { r.geometry_bounds_northeast, r.geometry_bounds_southwest }, out center, out zoom);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map.zoom = zoom;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (marker == null) marker = OnlineMapsMarkerManager.CreateItem(r.geometry_location, r.formatted_address);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; marker.position = r.geometry_location;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; marker.label = r.formatted_address;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scrollViewSearchHandlr.SetActive(false);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsGoogleDirections request = new OnlineMapsGoogleDirections<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; googleAPIKey,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MapHald.GetComponent&lt;MarkerAtBottom&gt;().locationMarker.position, // FROM (string or Vector2)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; marker.position // TO (string or Vector2)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Specifies that search results must be sent to OnFindDirectionComplete.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; request.OnComplete += OnFindDirectionComplete;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; request.Send();<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; public void SettingResult()<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsGoogleGeocodingResult r = LatteryResults[Index_Result_Selected];<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map.position = r.geometry_location;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Vector2 center;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int zoom;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsUtils.GetCenterPointAndZoom(new[] { r.geometry_bounds_northeast, r.geometry_bounds_southwest }, out center, out zoom);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map.zoom = zoom;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (marker == null) marker = OnlineMapsMarkerManager.CreateItem(r.geometry_location, r.formatted_address);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; marker.position = r.geometry_location;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; marker.label = r.formatted_address;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; /// This method is called when the input field text is changed.<br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;/summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; public void OnInputChanged()<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!useAutocomplete) return;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!OnlineMapsKeyManager.hasGoogleMaps) return;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (inputField.text.Length &lt; 3)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (autocompleteContainer != null) autocompleteContainer.gameObject.SetActive(false);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsGooglePlacesAutocomplete.Find(inputField.text).OnComplete += OnAutocompleteComplete;<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; /// This method is called when the search button is pressed.<br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;/summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; public void Search()<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; scrollViewSearchHandlr.SetActive(true);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foreach (Transform child in autocompleteContainer)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Destroy the child GameObject<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Destroy(child.gameObject);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!OnlineMapsKeyManager.hasGoogleMaps)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug.LogWarning(&quot;Please enter Map / Key Manager / Google Maps&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (inputField == null) return;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (inputField.text.Length &lt; 3) return;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string locationName = inputField.text;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsGoogleGeocoding request = new OnlineMapsGoogleGeocoding(locationName, OnlineMapsKeyManager.GoogleMaps());<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; request.OnComplete += OnGeocodingComplete;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; request.Send();<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; /// Shows the autocomplete container.<br />&nbsp; &nbsp; &nbsp; &nbsp; /// &lt;/summary&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; private void ShowAutocomplete()<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!useAutocomplete) return;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (autocompleteContainer == null) return;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (autocompleteContainer.transform.childCount == 0) return;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; autocompleteContainer.gameObject.SetActive(true);<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; private void Start()<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (map == null) map = OnlineMaps.instance;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EventTrigger trigger = inputField.gameObject.AddComponent&lt;EventTrigger&gt;();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EventTrigger.Entry lostFocusEntry = new EventTrigger.Entry {eventID = EventTriggerType.Deselect};<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lostFocusEntry.callback.AddListener((data) =&gt; { HideAutocomplete(); });<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trigger.triggers.Add(lostFocusEntry);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EventTrigger.Entry gainFocusEntry = new EventTrigger.Entry {eventID = EventTriggerType.Select};<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gainFocusEntry.callback.AddListener((data) =&gt; { ShowAutocomplete(); });<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trigger.triggers.Add(gainFocusEntry);<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; private void Update()<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EventSystem eventSystem = EventSystem.current;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ((OnlineMapsInput.GetKeyUp(KeyCode.KeypadEnter) || OnlineMapsInput.GetKeyUp(KeyCode.Return)) &amp;&amp; eventSystem.currentSelectedGameObject == inputField.gameObject)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Search();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; private void OnFindDirectionComplete(string response)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Get the result object.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsGoogleDirectionsResult result = OnlineMapsGoogleDirections.GetResult(response);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Check that the result is not null, and the number of routes is not zero.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (result == null || result.routes.Length == 0)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;Find direction failed&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(response);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Showing the console instructions for each step.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foreach (OnlineMapsGoogleDirectionsResult.Leg leg in result.routes[0].legs)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foreach (OnlineMapsGoogleDirectionsResult.Step step in leg.steps)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(step.string_instructions);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Create a line, on the basis of points of the route.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsDrawingLine route = new OnlineMapsDrawingLine(result.routes[0].overview_polylineD, Color.green);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Add the line route on the map.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; map.drawingElementManager.Add(route);<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }<br />}<br />on click search icon button&nbsp; i attached Search() function<br />and here i more 1 problem the LocationMarker doesn&#039;t present on the map !!!! ??<br />you suggest to replace the map with another map ?</p>]]></description>
			<author><![CDATA[null@example.com (tamim.ali.zoabi)]]></author>
			<pubDate>Mon, 04 Nov 2024 18:40:11 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9710#p9710</guid>
		</item>
		<item>
			<title><![CDATA[Re: Camara Orbit Tremling]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9708#p9708</link>
			<description><![CDATA[<p>1, 2. There&#039;s one compass here, and it&#039;s Unity Compass.<br />Online Maps takes data from it, and notifies the user when the value has changed. No more, no less.<br />So, unfortunately, I can&#039;t help with your device tilt problem, and you need to contact Unity support.</p><p>3. Where did you get the points of the route from?<br />If it is some script, please show it.<br />If it&#039;s your data, check it on any other map, like the web version of Google Maps.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 04 Nov 2024 16:51:57 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9708#p9708</guid>
		</item>
		<item>
			<title><![CDATA[Re: Camara Orbit Tremling]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9706#p9706</link>
			<description><![CDATA[<div class="quotebox"><cite>Alex Vertax wrote:</cite><blockquote><p>Your camera changes by 20-40 degrees because that data comes from Unity Compass.<br /><a href="https://docs.unity3d.com/ScriptReference/Compass.html">https://docs.unity3d.com/ScriptReference/Compass.html</a><br />Unfortunately, I don&#039;t know why there is such a change in your case.<br />You&#039;d better ask Unity support.</p></blockquote></div><p>1-so generaly it must be stabile ؟ how cani make camera&nbsp; &nbsp;data comes from online maps V3 Compass ?<br />can you give me any very simple example about using compass and orbitCam and any settings if needed . to find were is the problem . i think this problem not supposed to be &quot;Error of rotation by compass&quot; !!!</p><p>2-maybe i did not understood ... is there a compass for unity and compass for online maps3 v3 . and i uses a deferent one ????</p><p>3- if you look at the attached image , you can see the rout drawn out of the roads !!!!!!</p>]]></description>
			<author><![CDATA[null@example.com (tamim.ali.zoabi)]]></author>
			<pubDate>Sun, 03 Nov 2024 19:58:38 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9706#p9706</guid>
		</item>
		<item>
			<title><![CDATA[Re: Camara Orbit Tremling]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9705#p9705</link>
			<description><![CDATA[<p>Your camera changes by 20-40 degrees because that data comes from Unity Compass.<br /><a href="https://docs.unity3d.com/ScriptReference/Compass.html">https://docs.unity3d.com/ScriptReference/Compass.html</a><br />Unfortunately, I don&#039;t know why there is such a change in your case.<br />You&#039;d better ask Unity support.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Sun, 03 Nov 2024 11:43:38 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9705#p9705</guid>
		</item>
		<item>
			<title><![CDATA[Re: Camara Orbit Tremling]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9704#p9704</link>
			<description><![CDATA[<p>Here is a video <br />I don&#039;t change direction just changed holding vertically an horizontally. But it change the map rotation at the time I didn&#039;t change direction</p><p>Video link : <br /><a href="https://www.loom.com/share/ec479ae6104342fb84e8c931d4818c87">https://www.loom.com/share/ec479ae61043 … 31d4818c87</a></p>]]></description>
			<author><![CDATA[null@example.com (tamim.ali.zoabi)]]></author>
			<pubDate>Sat, 02 Nov 2024 20:29:07 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9704#p9704</guid>
		</item>
		<item>
			<title><![CDATA[Re: Camara Orbit Tremling]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9703#p9703</link>
			<description><![CDATA[<p>i ll record a video to show you the problem when i hold my device vertically it show streets in a certain situation, but when i change holding the devise i same direction but in horizontal position the map direction change some degrees &quot;20-40 degrees&quot; !!!!!!</p>]]></description>
			<author><![CDATA[null@example.com (tamim.ali.zoabi)]]></author>
			<pubDate>Sat, 02 Nov 2024 19:55:47 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9703#p9703</guid>
		</item>
		<item>
			<title><![CDATA[Re: Camara Orbit Tremling]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9702#p9702</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>how can i just read Y axis .</p></blockquote></div><p>You can&#039;t get only Y axis because it&#039;s a compass.<br />Online Maps Location Service takes values from the Unity Compass class and if it has changed passes it to you.<br />I don&#039;t know why you have different compass values for different device tilts.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Sat, 02 Nov 2024 19:50:40 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9702#p9702</guid>
		</item>
		<item>
			<title><![CDATA[Re: Camara Orbit Tremling]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9701#p9701</link>
			<description><![CDATA[<p>what does thats mean ? <br />were is the problem ?<br />can you please expleane it to me ?</p>]]></description>
			<author><![CDATA[null@example.com (tamim.ali.zoabi)]]></author>
			<pubDate>Sat, 02 Nov 2024 19:42:26 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9701#p9701</guid>
		</item>
		<item>
			<title><![CDATA[Re: Camara Orbit Tremling]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9700#p9700</link>
			<description><![CDATA[<p>It&#039;s a compass, not a gyroscope, and it has no axis rotation. Only the direction to the north pole.</p><p>Online Maps Location Service is just a wrapper for Unity Location Service and Unity Compass classes.<br />If you want you can access Unity Compass directly.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Sat, 02 Nov 2024 19:38:21 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9700#p9700</guid>
		</item>
		<item>
			<title><![CDATA[Re: Camara Orbit Tremling]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9699#p9699</link>
			<description><![CDATA[<p>When i set my device in lying flat on a table, compass readings compas result, but when tilted in same direction , giving me another reading &quot;the map rotate using other degrees from lying flat&quot; . <br />in my code i used just Y axis . how can i just read Y axis .<br /> My Code: <br /> public OnlineMapsControlBase3D control;<br />&nbsp; &nbsp; public GameObject prefab;<br />&nbsp; &nbsp; private OnlineMapsMarker3D locationMarker;<br />&nbsp; &nbsp; private OnlineMaps map;<br />&nbsp; &nbsp; public float duration = 1;<br />&nbsp; &nbsp; public float compassThreshold = 4;</p><p>&nbsp; &nbsp; private float progress = 1;<br />&nbsp; &nbsp; private float fromHeading;<br />&nbsp; &nbsp; private float toHeading;</p><p>&nbsp; &nbsp; public OnlineMapsCameraOrbit cameraOrbit;<br />&nbsp; &nbsp; private OnlineMapsMarker playerMarker;<br />&nbsp; &nbsp; public GameObject StartHandler, RoomHandler, GpsHandler;</p><p>&nbsp; <br />&nbsp; &nbsp;</p><p>&nbsp; &nbsp; private void Start()<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; if (map == null) map = OnlineMaps.instance;<br />&nbsp; &nbsp; &nbsp; &nbsp; playerMarker = map.markerManager.Create(0, 0, null, &quot;Player&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; playerMarker.scale = 0.018f;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; if (cameraOrbit == null) cameraOrbit = OnlineMapsCameraOrbit.instance;<br />&nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsLocationService locationService = OnlineMapsLocationService.instance;<br />&nbsp; &nbsp; &nbsp; &nbsp; locationService.compassThreshold = 0;<br />&nbsp; &nbsp; &nbsp; &nbsp; if (locationService == null)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug.LogError(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;Location Service not found.\nAdd Location Service Component (Component / Infinity Code / Online Maps / Plugins / Location Service).&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; locationService.OnLocationChanged += OnLocationChanged;<br />&nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsLocationService.instance.OnCompassChanged += OnCompassChanged;<br />&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; }<br />&nbsp; <br />&nbsp; &nbsp; private void OnLocationChanged(Vector2 position)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; playerMarker.position = position;<br />&nbsp; &nbsp; &nbsp; &nbsp; map.Redraw();<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; private void OnCompassChanged(float heading)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; heading *= 360;<br />&nbsp; &nbsp; &nbsp; &nbsp; if (Mathf.Abs(heading - toHeading) &lt; compassThreshold) return;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; toHeading = heading;<br />&nbsp; &nbsp; &nbsp; &nbsp; fromHeading = cameraOrbit.rotation.y;<br />&nbsp; &nbsp; &nbsp; &nbsp; progress = 0;<br />&nbsp; &nbsp; &nbsp; &nbsp; playerMarker.rotation= (heading * 360)/360;<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; private void Update()<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; if (progress &gt;= 1) return;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; progress += Time.deltaTime / duration;<br />&nbsp; &nbsp; &nbsp; &nbsp; cameraOrbit.rotation.y = Mathf.LerpAngle(fromHeading, toHeading, progress);<br />&nbsp; &nbsp; }</p>]]></description>
			<author><![CDATA[null@example.com (tamim.ali.zoabi)]]></author>
			<pubDate>Sat, 02 Nov 2024 00:29:54 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9699#p9699</guid>
		</item>
		<item>
			<title><![CDATA[Re: Camara Orbit Tremling]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9694#p9694</link>
			<description><![CDATA[<p>OK. I don&#039;t believe in magic, and there is a reasonable explanation for everything.</p><p>You have a situation where the marker rotates with the map.<br />Let&#039;s look at all the cases where this is possible:<br />1. You are rotating in this script. <br />Not in this case, because you are not rotating in this script.<br />2. Another script takes the marker on the link and rotates it. <br />Not in this case, because the field is private.<br />3. Another script gets the marker using reflection. <br />I am 100% sure you are not doing that.<br />4. Another script takes that marker from Marker 3D Manager and rotates it. <br />Maybe, but very unlikely.<br />5. A script on the marker itself rotates it.<br />Maybe, but unlikely.<br />6. You have multiple markers that multiple scripts create, and it is not the marker created by this script that is rotated, but another marker created by another script.<br />This is the most likely scenario, and is very easy to check just by looking in the inspector on the Marker 3D Manager.</p><p>Unfortunately, I didn&#039;t understand the “strange rotation problem”.<br />I think a short video showing the problem would help a lot to explain it.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 31 Oct 2024 21:50:52 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9694#p9694</guid>
		</item>
		<item>
			<title><![CDATA[Re: Camara Orbit Tremling]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9693#p9693</link>
			<description><![CDATA[<p>were did i used a different marker in the script . i create a 3d mareker prefab (locationMarker) and i used it in the script,<br />i was trying to search for another marker as you say , cant find were is the point that you trying to explain to me.</p><p>beside that there is a strange rotation problem , when i start driving the Direction is correct as a compas direction . suddenly it start to be inverted and for while the marker go out of the road &quot;1 cm&quot; .<br />is there any adjustments i should setup in map scripts . or what is the reason for that mostly .</p>]]></description>
			<author><![CDATA[null@example.com (tamim.ali.zoabi)]]></author>
			<pubDate>Thu, 31 Oct 2024 18:29:46 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9693#p9693</guid>
		</item>
		<item>
			<title><![CDATA[Re: Camara Orbit Tremling]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9692#p9692</link>
			<description><![CDATA[<p>In this script you are not rotating the marker, so this behavior is coming from some other script you are using.<br />Most likely the rotating marker is a different marker than the one you are creating in this script.<br />So please check the scripts you are using.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 31 Oct 2024 11:49:54 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9692#p9692</guid>
		</item>
		<item>
			<title><![CDATA[Re: Camara Orbit Tremling]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9691#p9691</link>
			<description><![CDATA[<p>i used MarkerAtBottom.cs but i got many strange outputs. <br />then i have my code like that: <br />using UnityEngine;<br />using UnityEngine.UI;</p><p>public class MarkerAtBottom : MonoBehaviour<br />{<br />&nbsp; &nbsp; public OnlineMapsControlBase3D control;<br />&nbsp; &nbsp; public float zoomLevel = 14;<br />&nbsp; &nbsp; public GameObject prefab;<br />&nbsp; &nbsp; private Vector2 currentLocation;<br />&nbsp; &nbsp; private OnlineMapsMarker3D locationMarker;<br />&nbsp; &nbsp; public float distance = 1;<br />&nbsp; &nbsp; public Text text;</p><p>&nbsp; &nbsp; private void Start()<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; // If the control is not specified, get the current instance.<br />&nbsp; &nbsp; &nbsp; &nbsp; if (control == null) control = OnlineMapsControlBase3D.instance;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; // Check if the control is 3D.<br />&nbsp; &nbsp; &nbsp; &nbsp; if (control == null)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text.text = &quot;You must use the 3D control (Texture or Tileset).&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; // Get initial location<br />&nbsp; &nbsp; &nbsp; &nbsp; currentLocation = new Vector2(Input.location.lastData.longitude, Input.location.lastData.latitude);<br />&nbsp; &nbsp; &nbsp; &nbsp; SetMapPositionWithOffset(currentLocation, 0.3f);<br />&nbsp; &nbsp; &nbsp; &nbsp; // Create marker at an initial position<br />&nbsp; &nbsp; &nbsp; &nbsp; locationMarker = control.marker3DManager.Create(Vector2.zero, prefab);<br />&nbsp; &nbsp; &nbsp; &nbsp; locationMarker.scale = 6f;<br />&nbsp; &nbsp; &nbsp; &nbsp; locationMarker.enabled = false;</p><p>&nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; // Center map on initial location and set zoom<br />&nbsp; &nbsp; &nbsp; &nbsp; OnlineMaps.instance.SetPositionAndZoom(currentLocation.x, currentLocation.y, zoomLevel);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; // Set up location service and subscribe to events<br />&nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsLocationService ls = OnlineMapsLocationService.instance;<br />&nbsp; &nbsp; &nbsp; &nbsp; if (ls == null)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text.text = &quot;Location Service not found.&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; // Subscribe to GPS location changes<br />&nbsp; &nbsp; &nbsp; &nbsp; ls.OnLocationChanged += OnLocationChanged;<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; private void Update()<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; // Lock the rotation of the marker prefab<br />&nbsp; &nbsp; &nbsp; &nbsp; if (locationMarker != null &amp;&amp; locationMarker.instance != null)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; locationMarker.instance.transform.rotation = Quaternion.identity;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; private void OnLocationChanged(Vector2 position)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; // Update marker position when GPS location changes<br />&nbsp; &nbsp; &nbsp; &nbsp; if (locationMarker != null)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; locationMarker.position = position;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; locationMarker.enabled = true;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Optionally, recenter map on the new position<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //OnlineMaps.instance.position = position;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //SetMapPositionWithOffset(position, 0.2f);<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; private void SetMapPositionWithOffset(Vector2 position, float offset)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; // Calculate a latitude offset for the map (positive moves it up, negative moves it down)<br />&nbsp; &nbsp; &nbsp; &nbsp; double offsetLatitude = position.y + offset;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; // Set the map&#039;s center position with the adjusted latitude and specified zoom level.<br />&nbsp; &nbsp; &nbsp; &nbsp; OnlineMaps.instance.SetPositionAndZoom(position.x, offsetLatitude, zoomLevel);<br />&nbsp; &nbsp; }<br />}<br />but the map still centered, and the Marker still rotate when map rotated. what i should change or add to my script to have the map set slightly to bottom and marker appear slightly at bottom and not rotated.</p>]]></description>
			<author><![CDATA[null@example.com (tamim.ali.zoabi)]]></author>
			<pubDate>Wed, 30 Oct 2024 20:10:29 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9691#p9691</guid>
		</item>
	</channel>
</rss>
