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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2021-03-25T03:57:49+00:00</updated>

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

		<entry>
		<author><name><![CDATA[acu192]]></name></author>
		<updated>2021-03-25T03:57:49+00:00</updated>

		<published>2021-03-25T03:57:49+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43366#p43366</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43366#p43366"/>
		<title type="html"><![CDATA[Re: btPersistentManifold::getNumContacts always returns zero]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43366#p43366"><![CDATA[
Yep, I'm seeing the same behavior as @s_kohan. Even if there is a <strong class="text-strong">btPersistentManifold</strong>, you still have to check <strong class="text-strong">getNumContacts() &gt; 0</strong> to actually know if the collision is for-realz.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13895">acu192</a> — Thu Mar 25, 2021 3:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[s_kohan]]></name></author>
		<updated>2019-07-03T18:10:16+00:00</updated>

		<published>2019-07-03T18:10:16+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42250#p42250</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42250#p42250"/>
		<title type="html"><![CDATA[Re: btPersistentManifold::getNumContacts always returns zero]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42250#p42250"><![CDATA[
Thank you, I actually ended up solving the problem myself.  It turns out the problem was a false assumption I had about the contact manifolds: I thought they would only be created when there were already points of contact, but it turns out those "collisions" are already registered when the bodies are just close (broad-phase detection I think?) - so I just had to make my collision handling logic a bit smarter and wait until the collision manifolds already had contacts before handling it.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13254">s_kohan</a> — Wed Jul 03, 2019 6:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drleviathan]]></name></author>
		<updated>2019-06-17T15:06:29+00:00</updated>

		<published>2019-06-17T15:06:29+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42211#p42211</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42211#p42211"/>
		<title type="html"><![CDATA[Re: btPersistentManifold::getNumContacts always returns zero]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42211#p42211"><![CDATA[
I would like to help, however I don't have any good hypothesises.  I looked at some working code that harvests contacts details from the contact manifolds and AFAICT your code should work.  Perhaps you could supply enough source to actually build and reproduce your problem?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11033">drleviathan</a> — Mon Jun 17, 2019 3:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[s_kohan]]></name></author>
		<updated>2019-06-15T16:36:37+00:00</updated>

		<published>2019-06-15T16:36:37+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42199#p42199</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42199#p42199"/>
		<title type="html"><![CDATA[btPersistentManifold::getNumContacts always returns zero]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=42199#p42199"><![CDATA[
I want to get access to the contact point details for a collision.  The problem is, whenever I try to get the number of contacts from a manifold, via btPersistentManifold::getNumContacts, the result is always zero.  Here's how I'm getting the contacts:<br><div class="codebox"><p>Code: </p><pre><code>          // these methods are part of a C wrapper so I can use bullet using the C FFIint btDynamicsWorldGetCollisionCount(btDynamicsWorldRef* world) {return ((btDynamicsWorld*)world)-&gt;getDispatcher()-&gt;getNumManifolds();}btContact btDynamicsWorldGetCollision(btDynamicsWorldRef* world, int index) {btPersistentManifold* contactManifold = ((btDynamicsWorld*)world)-&gt;getDispatcher()-&gt;getManifoldByIndexInternal(index);btContact contact; // this is a struct defined to expose contact info to this C wrappercontact.objectA = contactManifold-&gt;getBody0()-&gt;getUserPointer();contact.objectB = contactManifold-&gt;getBody1()-&gt;getUserPointer();contact.manifoldRef = (btContactManifoldRef*)contactManifold;return contact;}     int btContactManifordGetContactCount(btContactManifoldRef* manifold) {        btPersistentManifold* contactManifold = (btPersistentManifold*) manifold;        int count = contactManifold-&gt;getNumContacts();        return count;    }</code></pre></div>The strange thing is, when I debug, I can see that there are 4 btManifoldPoint records inside contactManifold-&gt;m_pointCache.  What am I missing here?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13254">s_kohan</a> — Sat Jun 15, 2019 4:36 pm</p><hr />
]]></content>
	</entry>
	</feed>
