<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/10119" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2014-09-15T12:00:43+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/10119</id>

		<entry>
		<author><name><![CDATA[SRGBulletPhysics]]></name></author>
		<updated>2014-09-15T12:00:43+00:00</updated>

		<published>2014-09-15T12:00:43+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=34007#p34007</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=34007#p34007"/>
		<title type="html"><![CDATA[Proper way to add and remove a rigid body from the world?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=34007#p34007"><![CDATA[
Hi,<br><br>I have a dynamic rigid body which i add and remove from my world frequently. Every time a button is pressed.<br><br>I add the object to the world using this call... <br><div class="codebox"><p>Code: </p><pre><code>m_dynamicsWorld-&gt;addRigidBody( pBody-&gt;GetRigidBody(), group, mask );</code></pre></div>I remove the object from the world using this call... <br><div class="codebox"><p>Code: </p><pre><code>m_dynamicsWorld-&gt;removeRigidBody( pBody-&gt;GetRigidBody() );</code></pre></div>This works almost all of the time but sometimes i get an assert here...<br><div class="codebox"><p>Code: </p><pre><code>int btPersistentManifold::addManifoldPoint(const btManifoldPoint&amp; newPoint, bool isPredictive){if (!isPredictive){btAssert(validContactDistance(newPoint));}</code></pre></div><br>From what i can tell Bullet physics is interpolating from the coordinates my object was removed from the world at, to the new coordinates the object is being added to the world at. And in doing so is colliding with a kinematic body. Causing the assert above.<br><br>The behaviour i wanted was that my object would just appear at the new coordinates. I already know that these new coordinates don't have another object there.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=10956">SRGBulletPhysics</a> — Mon Sep 15, 2014 12:00 pm</p><hr />
]]></content>
	</entry>
	</feed>
