<?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: How To Use Box2D For Just Collision Detection with Cocos2D iPhone</title>
	<atom:link href="http://www.raywenderlich.com/606/how-to-use-box2d-for-just-collision-detection-with-cocos2d-iphone/feed" rel="self" type="application/rss+xml" />
	<link>http://www.raywenderlich.com/606/how-to-use-box2d-for-just-collision-detection-with-cocos2d-iphone</link>
	<description>Tutorials for iPhone / iOS Developers and Gamers</description>
	<lastBuildDate>Sun, 29 Jan 2012 06:07:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
	<item>
		<title>By: Ray Wenderlich</title>
		<link>http://www.raywenderlich.com/606/how-to-use-box2d-for-just-collision-detection-with-cocos2d-iphone#comment-6468</link>
		<dc:creator>Ray Wenderlich</dc:creator>
		<pubDate>Sun, 21 Nov 2010 20:57:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=606#comment-6468</guid>
		<description>@keithlee980: For setting up a mouse joint, you usually put a static (fixed) body as bodyA.  Usually in games (like this one) you create a border around an area to act as the &quot;ground&quot; that doesn&#039;t move, so that is a good thing to use for bodyA.  Does that make sense?

If you&#039;re not getting a response form your mouse joint, first check and make sure that your ccTouchMoved method is getting called.</description>
		<content:encoded><![CDATA[<p>@keithlee980: For setting up a mouse joint, you usually put a static (fixed) body as bodyA.  Usually in games (like this one) you create a border around an area to act as the &#8220;ground&#8221; that doesn&#8217;t move, so that is a good thing to use for bodyA.  Does that make sense?</p>
<p>If you&#8217;re not getting a response form your mouse joint, first check and make sure that your ccTouchMoved method is getting called.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: keithlee980</title>
		<link>http://www.raywenderlich.com/606/how-to-use-box2d-for-just-collision-detection-with-cocos2d-iphone#comment-6350</link>
		<dc:creator>keithlee980</dc:creator>
		<pubDate>Fri, 19 Nov 2010 02:31:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=606#comment-6350</guid>
		<description>ok,i find this tutorial: http://www.cocos2d-iphone.org/forum/topic/7219#post-42388
 and figure it out. bodyB is the object that i want to move, but i do not quite understand what bodyA means.</description>
		<content:encoded><![CDATA[<p>ok,i find this tutorial: <a href="http://www.cocos2d-iphone.org/forum/topic/7219#post-42388" rel="nofollow">http://www.cocos2d-iphone.org/forum/topic/7219#post-42388</a><br />
 and figure it out. bodyB is the object that i want to move, but i do not quite understand what bodyA means.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: keithlee</title>
		<link>http://www.raywenderlich.com/606/how-to-use-box2d-for-just-collision-detection-with-cocos2d-iphone#comment-6333</link>
		<dc:creator>keithlee</dc:creator>
		<pubDate>Thu, 18 Nov 2010 16:43:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=606#comment-6333</guid>
		<description>hi everybody:
    when i use b2MouseJoint,i have a problem. I got no response in simulator when i move my mouse.
Here is my code:

-(void)ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event{
CGPoint location = [touch locationInView:[touch view]];
location = [[CCDirector sharedDirector]convertToGl:location];
b2Vec2 MousePosition = b2Vec2(location.x,location.y);
b2MouseJointDef md;
b2MouseJoint *mj;
md.bodyA=groundBody;  
md.bodyB=_body;
//_body is the body which i want to move;
md.target=MousePosition;
md.maxForce=1000*_body-&gt;GetMass();
mj=(b2MouseJoint *)_world-&gt;CreateJoint(&amp;md);
_body-&gt;SetAwake(true);
mj-&gt;SetTarget(MousePosition);
}

There is no document in box2d manual. So could someone give me a sample code? Thank you in advance.</description>
		<content:encoded><![CDATA[<p>hi everybody:<br />
    when i use b2MouseJoint,i have a problem. I got no response in simulator when i move my mouse.<br />
Here is my code:</p>
<p>-(void)ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event{<br />
CGPoint location = [touch locationInView:[touch view]];<br />
location = [[CCDirector sharedDirector]convertToGl:location];<br />
b2Vec2 MousePosition = b2Vec2(location.x,location.y);<br />
b2MouseJointDef md;<br />
b2MouseJoint *mj;<br />
md.bodyA=groundBody;<br />
md.bodyB=_body;<br />
//_body is the body which i want to move;<br />
md.target=MousePosition;<br />
md.maxForce=1000*_body-&gt;GetMass();<br />
mj=(b2MouseJoint *)_world-&gt;CreateJoint(&amp;md);<br />
_body-&gt;SetAwake(true);<br />
mj-&gt;SetTarget(MousePosition);<br />
}</p>
<p>There is no document in box2d manual. So could someone give me a sample code? Thank you in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray Wenderlich</title>
		<link>http://www.raywenderlich.com/606/how-to-use-box2d-for-just-collision-detection-with-cocos2d-iphone#comment-6285</link>
		<dc:creator>Ray Wenderlich</dc:creator>
		<pubDate>Wed, 17 Nov 2010 03:29:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=606#comment-6285</guid>
		<description>@Raghav: You can put whatever you want as the userdata for a Box2D body.  You obviously need some kind of data structure to identify the objects that you want to check if they&#039;re colliding - whether they are subclasses of CCSprite, custom game objects, etc.  Whatever it is, you can pass that in as the user data, and then pull it out to see what collided.</description>
		<content:encoded><![CDATA[<p>@Raghav: You can put whatever you want as the userdata for a Box2D body.  You obviously need some kind of data structure to identify the objects that you want to check if they&#8217;re colliding &#8211; whether they are subclasses of CCSprite, custom game objects, etc.  Whatever it is, you can pass that in as the user data, and then pull it out to see what collided.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raghav Venkat</title>
		<link>http://www.raywenderlich.com/606/how-to-use-box2d-for-just-collision-detection-with-cocos2d-iphone#comment-6188</link>
		<dc:creator>Raghav Venkat</dc:creator>
		<pubDate>Mon, 15 Nov 2010 07:04:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=606#comment-6188</guid>
		<description>Hi Ray,
 I am a student from USC. I am building a mario like game using box2D and tilemap both combined.Your tutorials are very helpful to us in understanding each and every function.I tried the contact between two bodies using sprites using the tag and it works well.

 How can I determine which 2 bodies are in contact when I use the tilemap objects.In this case,I cannot use the tag to determine the objects.How can I link the tilemap objects to the colliding bodies</description>
		<content:encoded><![CDATA[<p>Hi Ray,<br />
 I am a student from USC. I am building a mario like game using box2D and tilemap both combined.Your tutorials are very helpful to us in understanding each and every function.I tried the contact between two bodies using sprites using the tag and it works well.</p>
<p> How can I determine which 2 bodies are in contact when I use the tilemap objects.In this case,I cannot use the tag to determine the objects.How can I link the tilemap objects to the colliding bodies</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray Wenderlich</title>
		<link>http://www.raywenderlich.com/606/how-to-use-box2d-for-just-collision-detection-with-cocos2d-iphone#comment-5909</link>
		<dc:creator>Ray Wenderlich</dc:creator>
		<pubDate>Mon, 08 Nov 2010 23:49:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=606#comment-5909</guid>
		<description>@Joseph, @Martin: Thanks guys, I&#039;ve added this to the tutorial to avoid confusing any future readers :]

@FabioTNT: Thanks glad you liked it!  :]

@Nicolas: There&#039;s actually a really nice feature built into Box2D that can help you with exactly that called raycasting.  The idea is you can draw a line (called a ray) from a point to a certain direction, and Box2D will tell you what it intersects!  It&#039;s great for vision tests like that.</description>
		<content:encoded><![CDATA[<p>@Joseph, @Martin: Thanks guys, I&#8217;ve added this to the tutorial to avoid confusing any future readers :]</p>
<p>@FabioTNT: Thanks glad you liked it!  :]</p>
<p>@Nicolas: There&#8217;s actually a really nice feature built into Box2D that can help you with exactly that called raycasting.  The idea is you can draw a line (called a ray) from a point to a certain direction, and Box2D will tell you what it intersects!  It&#8217;s great for vision tests like that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicolas</title>
		<link>http://www.raywenderlich.com/606/how-to-use-box2d-for-just-collision-detection-with-cocos2d-iphone#comment-5682</link>
		<dc:creator>Nicolas</dc:creator>
		<pubDate>Wed, 03 Nov 2010 22:36:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=606#comment-5682</guid>
		<description>Hi, thanks for your post. You did fantastic job!

I am working with cocos2d with box2d and i need some tips. I am working with some &quot;vision test&quot; to detect when an enemy can shoot to the character. I am thinking of using a body from the enemy to the caracter to shoot and detect only the collision but ignore the physics. Any idea?

Thanks!!</description>
		<content:encoded><![CDATA[<p>Hi, thanks for your post. You did fantastic job!</p>
<p>I am working with cocos2d with box2d and i need some tips. I am working with some &#8220;vision test&#8221; to detect when an enemy can shoot to the character. I am thinking of using a body from the enemy to the caracter to shoot and detect only the collision but ignore the physics. Any idea?</p>
<p>Thanks!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

