<?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: Using BitmapData.hitTest for Collision Detection</title>
	<atom:link href="http://www.mikechambers.com/blog/2009/06/24/using-bitmapdata-hittest-for-collision-detection/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikechambers.com/blog/2009/06/24/using-bitmapdata-hittest-for-collision-detection/</link>
	<description>code = joy</description>
	<lastBuildDate>Thu, 11 Mar 2010 21:22:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: anon</title>
		<link>http://www.mikechambers.com/blog/2009/06/24/using-bitmapdata-hittest-for-collision-detection/comment-page-1/#comment-18465</link>
		<dc:creator>anon</dc:creator>
		<pubDate>Mon, 15 Feb 2010 21:32:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1745#comment-18465</guid>
		<description>What if the two movieclips you wish to compare are composed of many nested clips, all of which could be at any arbitrary x/y value and any arbitrary scale?  It seems like the matrix transformation trick works if only the first layer is off center or rotated, but if the clip is many layers deep and the transformations are completely random for each layer, it&#039;s not working.

For instance, what if blueClip were like this:

blueClip x=20, y=50
 + blueClipChild x = 400, y = -20
   + blueClipChildChild x = -1309, y = 20
     + Shape (square, 30px/300px at x = 10, y = -280)

How would you solve for this?</description>
		<content:encoded><![CDATA[<p>What if the two movieclips you wish to compare are composed of many nested clips, all of which could be at any arbitrary x/y value and any arbitrary scale?  It seems like the matrix transformation trick works if only the first layer is off center or rotated, but if the clip is many layers deep and the transformations are completely random for each layer, it&#8217;s not working.</p>
<p>For instance, what if blueClip were like this:</p>
<p>blueClip x=20, y=50<br />
 + blueClipChild x = 400, y = -20<br />
   + blueClipChildChild x = -1309, y = 20<br />
     + Shape (square, 30px/300px at x = 10, y = -280)</p>
<p>How would you solve for this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Claire</title>
		<link>http://www.mikechambers.com/blog/2009/06/24/using-bitmapdata-hittest-for-collision-detection/comment-page-1/#comment-18433</link>
		<dc:creator>Claire</dc:creator>
		<pubDate>Tue, 09 Feb 2010 14:15:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1745#comment-18433</guid>
		<description>Thanks very much for posting this Mike. 

I&#039;m pretty new to AS3 and I&#039;ve spent weeks investigating the most effective way to implement hit testing in the platform game I&#039;m developing. 

I&#039;ve not found a conclusion this comprehensive anywhere, and it all makes total sense.</description>
		<content:encoded><![CDATA[<p>Thanks very much for posting this Mike. </p>
<p>I&#8217;m pretty new to AS3 and I&#8217;ve spent weeks investigating the most effective way to implement hit testing in the platform game I&#8217;m developing. </p>
<p>I&#8217;ve not found a conclusion this comprehensive anywhere, and it all makes total sense.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Converting from a Matrix3D to Matrix in ActionScript 3 at Mike Chambers</title>
		<link>http://www.mikechambers.com/blog/2009/06/24/using-bitmapdata-hittest-for-collision-detection/comment-page-1/#comment-16699</link>
		<dc:creator>Converting from a Matrix3D to Matrix in ActionScript 3 at Mike Chambers</dc:creator>
		<pubDate>Wed, 09 Sep 2009 17:48:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1745#comment-16699</guid>
		<description>[...] I made a post earlier showing how (with much, much help from Senocular), I was able to use Matrix to do hit tests using BitmapData.hitTest on DisplayObjects which have had transformations applied to them (in this case, [...]</description>
		<content:encoded><![CDATA[<p>[...] I made a post earlier showing how (with much, much help from Senocular), I was able to use Matrix to do hit tests using BitmapData.hitTest on DisplayObjects which have had transformations applied to them (in this case, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://www.mikechambers.com/blog/2009/06/24/using-bitmapdata-hittest-for-collision-detection/comment-page-1/#comment-16617</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Wed, 12 Aug 2009 19:55:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1745#comment-16617</guid>
		<description>Brad, use the second example Mike posted. It uses the transform matrix to counter any offset created from a registration point not in the top left, as well as counter any rotation or scaling. The part that does this is:

var blueOffset:Matrix = blueClip.transform.matrix;
blueOffset.tx = blueClip.x - blueRect.x;
blueOffset.ty = blueClip.y - blueRect.y;

blueClipBmpData.draw(blueClip, blueOffset);

And same for the redClip.</description>
		<content:encoded><![CDATA[<p>Brad, use the second example Mike posted. It uses the transform matrix to counter any offset created from a registration point not in the top left, as well as counter any rotation or scaling. The part that does this is:</p>
<p>var blueOffset:Matrix = blueClip.transform.matrix;<br />
blueOffset.tx = blueClip.x &#8211; blueRect.x;<br />
blueOffset.ty = blueClip.y &#8211; blueRect.y;</p>
<p>blueClipBmpData.draw(blueClip, blueOffset);</p>
<p>And same for the redClip.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hannah</title>
		<link>http://www.mikechambers.com/blog/2009/06/24/using-bitmapdata-hittest-for-collision-detection/comment-page-1/#comment-16615</link>
		<dc:creator>hannah</dc:creator>
		<pubDate>Wed, 12 Aug 2009 16:20:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1745#comment-16615</guid>
		<description>Thanks, this is just what I had been looking for.  It works with my own objects that change position, too.</description>
		<content:encoded><![CDATA[<p>Thanks, this is just what I had been looking for.  It works with my own objects that change position, too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brad</title>
		<link>http://www.mikechambers.com/blog/2009/06/24/using-bitmapdata-hittest-for-collision-detection/comment-page-1/#comment-16569</link>
		<dc:creator>brad</dc:creator>
		<pubDate>Wed, 29 Jul 2009 17:45:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1745#comment-16569</guid>
		<description>This works great with clips that are aligned top-left but when I used center aligned clips only the center point detects as collision. I thought &quot;blueClip.x - blueClip.width/2 &quot; would be the correct point for a centered clip but it isn&#039;t working as expected. Why is that?</description>
		<content:encoded><![CDATA[<p>This works great with clips that are aligned top-left but when I used center aligned clips only the center point detects as collision. I thought &#8220;blueClip.x &#8211; blueClip.width/2 &#8221; would be the correct point for a centered clip but it isn&#8217;t working as expected. Why is that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SparK</title>
		<link>http://www.mikechambers.com/blog/2009/06/24/using-bitmapdata-hittest-for-collision-detection/comment-page-1/#comment-16544</link>
		<dc:creator>SparK</dc:creator>
		<pubDate>Tue, 21 Jul 2009 03:36:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1745#comment-16544</guid>
		<description>var performanceBoost = new Refactor();

if(isCDKOpenSource){
    CDK.read();
    CDK.edit(performanceBoost);
    CDK.publish();
}

=D</description>
		<content:encoded><![CDATA[<p>var performanceBoost = new Refactor();</p>
<p>if(isCDKOpenSource){<br />
    CDK.read();<br />
    CDK.edit(performanceBoost);<br />
    CDK.publish();<br />
}</p>
<p>=D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Relative performance for collision detection techniques in ActionScript 3 at Mike Chambers</title>
		<link>http://www.mikechambers.com/blog/2009/06/24/using-bitmapdata-hittest-for-collision-detection/comment-page-1/#comment-16445</link>
		<dc:creator>Relative performance for collision detection techniques in ActionScript 3 at Mike Chambers</dc:creator>
		<pubDate>Fri, 26 Jun 2009 22:28:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1745#comment-16445</guid>
		<description>[...] you have read my blog any this week, you have probably noticed that I have been doing some basic research on collision detection [...]</description>
		<content:encoded><![CDATA[<p>[...] you have read my blog any this week, you have probably noticed that I have been doing some basic research on collision detection [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan Shaw</title>
		<link>http://www.mikechambers.com/blog/2009/06/24/using-bitmapdata-hittest-for-collision-detection/comment-page-1/#comment-16436</link>
		<dc:creator>Alan Shaw</dc:creator>
		<pubDate>Thu, 25 Jun 2009 16:58:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1745#comment-16436</guid>
		<description>Thanks for this valuable guide.  It&#039;s something that people have been spending time and effort to figure out for themselves since Flash 8 came out.

I do have to say that all this clearly represents the intent of those who designed the API, and therefore should have been incuded in the documentation from the start.

Here&#039;s another example: the effect of the mergeAlpha parameter of copyPixels().  Moock states in EAS 3.0 that it uses the SCREEN blending mode, and gives the precise formula.  Why don&#039;t the docs mention this?

And of course the documentation on the DisplacementMapFilter -- don&#039;t get me started...</description>
		<content:encoded><![CDATA[<p>Thanks for this valuable guide.  It&#8217;s something that people have been spending time and effort to figure out for themselves since Flash 8 came out.</p>
<p>I do have to say that all this clearly represents the intent of those who designed the API, and therefore should have been incuded in the documentation from the start.</p>
<p>Here&#8217;s another example: the effect of the mergeAlpha parameter of copyPixels().  Moock states in EAS 3.0 that it uses the SCREEN blending mode, and gives the precise formula.  Why don&#8217;t the docs mention this?</p>
<p>And of course the documentation on the DisplacementMapFilter &#8212; don&#8217;t get me started&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 25/06/2009 &#171; Robertopriz&#8217;s Weblog</title>
		<link>http://www.mikechambers.com/blog/2009/06/24/using-bitmapdata-hittest-for-collision-detection/comment-page-1/#comment-16435</link>
		<dc:creator>25/06/2009 &#171; Robertopriz&#8217;s Weblog</dc:creator>
		<pubDate>Thu, 25 Jun 2009 13:13:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1745#comment-16435</guid>
		<description>[...] bitmapdata collision detection http://www.mikechambers.com/blog/2009/06/24/using-bitmapdata-hittest-for-collision-detection/ [...]</description>
		<content:encoded><![CDATA[<p>[...] bitmapdata collision detection <a href="http://www.mikechambers.com/blog/2009/06/24/using-bitmapdata-hittest-for-collision-detection/" rel="nofollow">http://www.mikechambers.com/blog/2009/06/24/using-bitmapdata-hittest-for-collision-detection/</a> [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
