<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Multi-Touch Handling on Unity iPhone</title>
	<atom:link href="http://technology.blurst.com/iphone-multi-touch/feed/" rel="self" type="application/rss+xml" />
	<link>http://technology.blurst.com/iphone-multi-touch/</link>
	<description>Tips, tricks, and tutorials from Flashbang&#039;s Unity development experience.</description>
	<lastBuildDate>Mon, 16 May 2011 07:22:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
	<item>
		<title>By: Sam Cox</title>
		<link>http://technology.blurst.com/iphone-multi-touch/#comment-300</link>
		<dc:creator>Sam Cox</dc:creator>
		<pubDate>Thu, 05 Aug 2010 01:22:44 +0000</pubDate>
		<guid isPermaLink="false">http://technology.blurst.com/?p=25#comment-300</guid>
		<description>Thanks for the ideas guys. I didn&#039;t use the code but took the idea and it&#039;s working really well. 

I was getting really frustrated with TouchInputPhase not being consistent as well as not being able to check if a touch exists before grabbing it (array exceptions). 

Plus your games rock balls.</description>
		<content:encoded><![CDATA[<p>Thanks for the ideas guys. I didn&#8217;t use the code but took the idea and it&#8217;s working really well. </p>
<p>I was getting really frustrated with TouchInputPhase not being consistent as well as not being able to check if a touch exists before grabbing it (array exceptions). </p>
<p>Plus your games rock balls.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan R.</title>
		<link>http://technology.blurst.com/iphone-multi-touch/#comment-82</link>
		<dc:creator>Ryan R.</dc:creator>
		<pubDate>Sun, 29 Mar 2009 23:27:24 +0000</pubDate>
		<guid isPermaLink="false">http://technology.blurst.com/?p=25#comment-82</guid>
		<description>Thanks for the code! This helped me immensely. I am working on some multitouch gesture code and intend to add to this when I get it all working.</description>
		<content:encoded><![CDATA[<p>Thanks for the code! This helped me immensely. I am working on some multitouch gesture code and intend to add to this when I get it all working.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Se7en</title>
		<link>http://technology.blurst.com/iphone-multi-touch/#comment-80</link>
		<dc:creator>Se7en</dc:creator>
		<pubDate>Sun, 08 Mar 2009 20:14:02 +0000</pubDate>
		<guid isPermaLink="false">http://technology.blurst.com/?p=25#comment-80</guid>
		<description>I just wanted to say thanks for the scripts - they work so much better than the Unity built in functions especially in recognition of a touch ending or a finger sliding out of the screen area.

I have been trying to call my external function through your system and just got it working. Instead of putting my game code inside of the TouchTracker Class I just check and store the fingerId in the external loop like so...

// START NEW TOUCH TRACKING
	
	for (var tracker : TouchTracker in trackers) {
	tracker.Clean();
	}
	
	for(var touch : iPhoneTouch in iPhoneInput.touches) { // process our touches
	var tracker : TouchTracker = trackerLookup[touch.fingerId]; 

		if (tracker) { 
			tracker.Update(touch); 
				if (thrust_button_down &amp;&amp; thrust_button_touch_ID == tracker.fingerId) {
				ThrustDown(touch);
				}
				if (fire_button_down &amp;&amp; fire_button_touch_ID == tracker.fingerId) {
				FireButtonDown(touch);
				}
				// Shield is a toggle
			} 
			else { 
			tracker = BeginTracking(touch);
				if (!thrust_button_down) {
				CheckThrust(touch);
				}
				if (!fire_button_down) {
				CheckFireButton(touch);
				}
				if (!shield_button_down) {
				CheckShieldButton(touch);
				}
			}
	}
	
	var ended:ArrayList = new ArrayList(); 
	
	for (var tracker : TouchTracker in trackers) { if (!tracker.isDirty) { ended.Add(tracker); }}
	
	for (var tracker : TouchTracker in ended) { 
		EndTracking(tracker); 
		if (thrust_button_down &amp;&amp; thrust_button_touch_ID == tracker.fingerId) {
		ThrustUp();
		}
		if (fire_button_down &amp;&amp; fire_button_touch_ID == tracker.fingerId) {
		FireButtonUp();
		}
		if (shield_button_down &amp;&amp; shield_button_touch_ID == tracker.fingerId) {
		ShieldButtonUp();
		}
	}
		
	// END NEW TOUCH TRACKING

This way the TouchTracker can stay abstracted and anything new that needs to be added can accessed from outside the Class scope. Believe me I am artist not a programmer so be kind to my code, it may not be very efficient or even a good idea : ) Anyway I had to turn on and off GUITextures and other game code so I could not do it from within the Class. I thought it was going to be a huge boss fight, but its working out really well so far.

You guys rock for sharing everything that you do, so I thought I would add something back to say thanks.</description>
		<content:encoded><![CDATA[<p>I just wanted to say thanks for the scripts &#8211; they work so much better than the Unity built in functions especially in recognition of a touch ending or a finger sliding out of the screen area.</p>
<p>I have been trying to call my external function through your system and just got it working. Instead of putting my game code inside of the TouchTracker Class I just check and store the fingerId in the external loop like so&#8230;</p>
<p>// START NEW TOUCH TRACKING</p>
<p>	for (var tracker : TouchTracker in trackers) {<br />
	tracker.Clean();<br />
	}</p>
<p>	for(var touch : iPhoneTouch in iPhoneInput.touches) { // process our touches<br />
	var tracker : TouchTracker = trackerLookup[touch.fingerId]; </p>
<p>		if (tracker) {<br />
			tracker.Update(touch);<br />
				if (thrust_button_down &amp;&amp; thrust_button_touch_ID == tracker.fingerId) {<br />
				ThrustDown(touch);<br />
				}<br />
				if (fire_button_down &amp;&amp; fire_button_touch_ID == tracker.fingerId) {<br />
				FireButtonDown(touch);<br />
				}<br />
				// Shield is a toggle<br />
			}<br />
			else {<br />
			tracker = BeginTracking(touch);<br />
				if (!thrust_button_down) {<br />
				CheckThrust(touch);<br />
				}<br />
				if (!fire_button_down) {<br />
				CheckFireButton(touch);<br />
				}<br />
				if (!shield_button_down) {<br />
				CheckShieldButton(touch);<br />
				}<br />
			}<br />
	}</p>
<p>	var ended:ArrayList = new ArrayList(); </p>
<p>	for (var tracker : TouchTracker in trackers) { if (!tracker.isDirty) { ended.Add(tracker); }}</p>
<p>	for (var tracker : TouchTracker in ended) {<br />
		EndTracking(tracker);<br />
		if (thrust_button_down &amp;&amp; thrust_button_touch_ID == tracker.fingerId) {<br />
		ThrustUp();<br />
		}<br />
		if (fire_button_down &amp;&amp; fire_button_touch_ID == tracker.fingerId) {<br />
		FireButtonUp();<br />
		}<br />
		if (shield_button_down &amp;&amp; shield_button_touch_ID == tracker.fingerId) {<br />
		ShieldButtonUp();<br />
		}<br />
	}</p>
<p>	// END NEW TOUCH TRACKING</p>
<p>This way the TouchTracker can stay abstracted and anything new that needs to be added can accessed from outside the Class scope. Believe me I am artist not a programmer so be kind to my code, it may not be very efficient or even a good idea : ) Anyway I had to turn on and off GUITextures and other game code so I could not do it from within the Class. I thought it was going to be a huge boss fight, but its working out really well so far.</p>
<p>You guys rock for sharing everything that you do, so I thought I would add something back to say thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DR9885</title>
		<link>http://technology.blurst.com/iphone-multi-touch/#comment-62</link>
		<dc:creator>DR9885</dc:creator>
		<pubDate>Sun, 08 Feb 2009 18:07:09 +0000</pubDate>
		<guid isPermaLink="false">http://technology.blurst.com/?p=25#comment-62</guid>
		<description>I wish it was in C#... but ty for the build!</description>
		<content:encoded><![CDATA[<p>I wish it was in C#&#8230; but ty for the build!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xiaoke</title>
		<link>http://technology.blurst.com/iphone-multi-touch/#comment-9</link>
		<dc:creator>Xiaoke</dc:creator>
		<pubDate>Wed, 12 Nov 2008 15:39:30 +0000</pubDate>
		<guid isPermaLink="false">http://technology.blurst.com/?p=25#comment-9</guid>
		<description>Oh!!Cool...I am trying to have as soon as the iphone</description>
		<content:encoded><![CDATA[<p>Oh!!Cool&#8230;I am trying to have as soon as the iphone</p>
]]></content:encoded>
	</item>
</channel>
</rss>

