<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Maratis forum - when are physics shapes and objects deleted?]]></title>
		<link>http://forum.maratis3d.com/viewtopic.php?id=823</link>
		<description><![CDATA[The most recent posts in when are physics shapes and objects deleted?.]]></description>
		<lastBuildDate>Tue, 15 Oct 2013 10:31:19 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: when are physics shapes and objects deleted?]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=5541#p5541</link>
			<description><![CDATA[<p>Still, I consider this not the expected behavior.<br />If you do a lua function &quot;deleteEntity()&quot; I&#039;m sure you will delete all the associated physics objects, so the same should be with C++.<br />You can make MScene do this, while the MOEntity code shouldn&#039;t need to be touched. I think this would keep a good design/structure.</p>]]></description>
			<author><![CDATA[dummy@example.com (255)]]></author>
			<pubDate>Tue, 15 Oct 2013 10:31:19 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=5541#p5541</guid>
		</item>
		<item>
			<title><![CDATA[Re: when are physics shapes and objects deleted?]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=5471#p5471</link>
			<description><![CDATA[<p>Yes, in this case you will need to destroy or at least deactivate the physics object manually just before :</p><p>MPhysicsProperties * phyProps = plane-&gt;getPhysicsProperties();<br />if(phyProps)<br />&nbsp; &nbsp; physics-&gt;deactivateObject(phyProps-&gt;getCollisionObjectId());</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Sat, 12 Oct 2013 08:52:58 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=5471#p5471</guid>
		</item>
		<item>
			<title><![CDATA[Re: when are physics shapes and objects deleted?]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=5463#p5463</link>
			<description><![CDATA[<p>This is &quot;preparing&quot;, &quot;initializing&quot;, but I&#039;m talking about deleting an entity or its physics properties. The actual physics objects and shapes are NOT deleted.<br />I was just guessing, reading the source code, but now I&#039;ve done a test and it&#039;s actually a real bug.</p><p>Create a project, create a falling box and a plane with mass 0.00 to stop the falling box.<br />In your game plugin do<br /></p><div class="codebox"><pre><code>MOEntity* plane = scene-&gt;getEntityByName(&quot;Plane&quot;);
scene-&gt;deleteObject(plane);</code></pre></div><p>Run the game, the box will fall and it will soon be stopped by the invisible physics object left by the plane entity.</p>]]></description>
			<author><![CDATA[dummy@example.com (255)]]></author>
			<pubDate>Sat, 12 Oct 2013 00:49:44 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=5463#p5463</guid>
		</item>
		<item>
			<title><![CDATA[Re: when are physics shapes and objects deleted?]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=5461#p5461</link>
			<description><![CDATA[<p>shapes and objects are automatically deleted by the physics context clear() function<br />MBulletContext::clear(void)</p><p>clear is called by MBulletContext::init, itself called by MScene::preparePhysics</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Fri, 11 Oct 2013 22:33:49 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=5461#p5461</guid>
		</item>
		<item>
			<title><![CDATA[when are physics shapes and objects deleted?]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=5458#p5458</link>
			<description><![CDATA[<p>I see that MPhysicsContext has deleteShape() and deleteObject() method but I don&#039;t see them used anywhere.<br />If I do<br /></p><div class="codebox"><pre><code>entity-&gt;createPhysicsProperties();</code></pre></div><p>physics properties and constraint are SAFE_DELETEd which means<br /></p><div class="codebox"><pre><code>delete pointer;
pointer = NULL;</code></pre></div><p>but the physics shape and object are not deleted.<br />I then call<br /></p><div class="codebox"><pre><code>scene-&gt;prepareCollisionShape(entity);
scene-&gt;prepareCollisionObject(entity);</code></pre></div><p>but in these functions there is no deleting of the previous object neither.</p>]]></description>
			<author><![CDATA[dummy@example.com (255)]]></author>
			<pubDate>Fri, 11 Oct 2013 19:33:20 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=5458#p5458</guid>
		</item>
	</channel>
</rss>
