<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<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">
	<channel>
		<title>cocos2d for iPhone &#187; Topic: From static to Dynamic?</title>
		<link>http://www.cocos2d-iphone.org/forum/topic/4484</link>
		<description>A fast, easy to use, free, and community supported 2D game engine</description>
		<language>en-US</language>
		<pubDate>Fri, 10 Feb 2012 01:54:28 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.cocos2d-iphone.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.cocos2d-iphone.org/forum/rss/topic/4484" rel="self" type="application/rss+xml" />

		<item>
			<title>mobilebros on "From static to Dynamic?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/4484#post-26758</link>
			<pubDate>Mon, 15 Feb 2010 21:16:17 +0000</pubDate>
			<dc:creator>mobilebros</dc:creator>
			<guid isPermaLink="false">26758@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Do you already have a static shape? If so, just do this to change it to a active shape:</p>
<pre><code>//remove the shape from the static hash
cpSpaceRemoveStaticShape(space, shape);

//set the mass of the new active shape
cpBodySetMass(shape-&#62;body, mass);

//add the shape and body to the active hashes
cpSpaceAddBody(space, shape-&#62;body);
cpSpaceAddShape(space, shape);</code></pre></description>
		</item>
		<item>
			<title>xcrunner509 on "From static to Dynamic?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/4484#post-26693</link>
			<pubDate>Mon, 15 Feb 2010 03:34:51 +0000</pubDate>
			<dc:creator>xcrunner509</dc:creator>
			<guid isPermaLink="false">26693@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hello, i was wondering how would i change an object from a static state to a dynamic state.</p>
<p>I have been told this: </p>
<p>"It's pretty simple actually. Create the body as normal (give it a normal mass), but do not add it to the space. Add the shape to the space as a static shape. Create a collision callback that does two things. 1) Add the body to space. 2) Remove the static shape from the space and re-add it as a normal shape."</p>
<p>But i am having trouble figuring out how to do this as i am used to Objective-C</p>
<p>Please help me with this
</p></description>
		</item>

	</channel>
</rss>

