<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Zoom map by pinching in and out on mobile]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1696&amp;type=atom" />
	<updated>2021-02-16T17:01:25Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=1696</id>
		<entry>
			<title type="html"><![CDATA[Re: Zoom map by pinching in and out on mobile]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7165#p7165" />
			<content type="html"><![CDATA[<p>OnlineMapsControlBase.UpdateGestureZoom is called from OnlineMapsControlBase.Update, and touchCount is the value returned by OnlineMapsControlBase.GetTouchCount.</p><p>There can be two situations when GetTouchCount returns a value other than Input.touchCount:<br />1. You (some script) uses OnlineMapsControlBase.OnGetTouchCount, and returns a different value.<br />2. On your device Input.touchSupported returns false, and this method returns 1 when the left mouse button is pressed.<br />Don&#039;t be surprised that I write about a mouse on a mobile device, because:<br /><a href="https://docs.unity3d.com/ScriptReference/Input-simulateMouseWithTouches.html">https://docs.unity3d.com/ScriptReferenc … uches.html</a></p><p>You need to understand which case is yours and fix it.<br />Also, using OnGetTouchCount, you can force Online Maps to use your value (Input.touchCount).</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2021-02-16T17:01:25Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7165#p7165</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Zoom map by pinching in and out on mobile]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7163#p7163" />
			<content type="html"><![CDATA[<p><span class="postimg"><img src="http://s.kota2.net/1613491542.png" alt="http://s.kota2.net/1613491542.png" /></span></p>]]></content>
			<author>
				<name><![CDATA[kmasaki]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1542</uri>
			</author>
			<updated>2021-02-16T16:18:18Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7163#p7163</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Zoom map by pinching in and out on mobile]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7162#p7162" />
			<content type="html"><![CDATA[<p><span class="postimg"><img src="http://s.kota2.net/1613491543.png" alt="http://s.kota2.net/1613491543.png" /></span></p>]]></content>
			<author>
				<name><![CDATA[kmasaki]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1542</uri>
			</author>
			<updated>2021-02-16T16:15:29Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7162#p7162</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Zoom map by pinching in and out on mobile]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7161#p7161" />
			<content type="html"><![CDATA[<p>Thanks for the reply.</p><p>The pinch-zoom function was built-in, as you said.<br />However, it did not work, so I will let you know the situation.</p><p>I checked the touch count in &quot;UpdateGestureZoom()&quot; of the &quot;OnlineMapsControlBase&quot; class, which is probably the pinch zoom process.</p><p>Please see the attached image.<br />There was a difference in the argument &quot;touchCount&quot; and &quot;Input.touchCount&quot;.<br />When pinch zooming with UnityRemote, the &quot;touchCount&quot; value was 1 and the &quot;Input.touchCount&quot; value was 2.</p><p>If you have any advice, please let me know.</p>]]></content>
			<author>
				<name><![CDATA[kmasaki]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1542</uri>
			</author>
			<updated>2021-02-16T16:11:54Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7161#p7161</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Zoom map by pinching in and out on mobile]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7157#p7157" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Pinch to zoom is a built-in Online Maps behavior that is enabled by default and you don&#039;t need any script for this to work.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2021-02-15T18:04:50Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7157#p7157</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Zoom map by pinching in and out on mobile]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7156#p7156" />
			<content type="html"><![CDATA[<p>I am looking for a way to zoom map by pinching in and out on mobile.<br />I found a script that solves the following problem</p><p><a href="https://forum.infinity-code.com/viewtopic.php?id=1310">https://forum.infinity-code.com/viewtopic.php?id=1310</a></p><p>However, when I assigned the above script to a map object, it did not work.<br />I would like to know how to use it correctly.</p><p>I ran this environment on Unity Remote.<br />I am able to move the map by dragging on Unity Remote.</p>]]></content>
			<author>
				<name><![CDATA[kmasaki]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1542</uri>
			</author>
			<updated>2021-02-15T16:01:23Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7156#p7156</id>
		</entry>
</feed>
