<?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/9340" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2013-08-13T20:52:55+00:00</updated>

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

		<entry>
		<author><name><![CDATA[inverse42]]></name></author>
		<updated>2013-08-13T20:52:55+00:00</updated>

		<published>2013-08-13T20:52:55+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=31543#p31543</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=31543#p31543"/>
		<title type="html"><![CDATA[CCD and gContactProcessedCallback]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=31543#p31543"><![CDATA[
I am trying to use CCD to prevent bullets from passing through an object.  The CCD part works fine, but when it is a CCD collision there is no callback to the game to report the collision.  This means that instead of getting destroyed on collision, some of these objects just ricochet of in random directions.<br><br>I added the usual callback to the bottom of the last if() statement in btDiscreteDynamicsWorld::createPredictiveContacts(...), as all of the relevant data appears to exist at that point:<br><div class="codebox"><p>Code: </p><pre><code>if(gContactProcessedCallback)(*gContactProcessedCallback)(pt, body, (void *)sweepResults.m_hitCollisionObject);</code></pre></div>I'm not sure if this is the correct fix or if it would be better to add a CCD-specific contact callback, but this seems to do what I expect now.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=9759">inverse42</a> — Tue Aug 13, 2013 8:52 pm</p><hr />
]]></content>
	</entry>
	</feed>
