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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2021-10-29T00:18:57+00:00</updated>

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

		<entry>
		<author><name><![CDATA[jzhong2]]></name></author>
		<updated>2021-10-29T00:18:57+00:00</updated>

		<published>2021-10-29T00:18:57+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43674#p43674</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43674#p43674"/>
		<title type="html"><![CDATA[Re: Setting Up Attracting Force Between Bodies]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43674#p43674"><![CDATA[
Thank you so much!!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14127">jzhong2</a> — Fri Oct 29, 2021 12:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drleviathan]]></name></author>
		<updated>2021-10-28T18:19:50+00:00</updated>

		<published>2021-10-28T18:19:50+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43673#p43673</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43673#p43673"/>
		<title type="html"><![CDATA[Re: Setting Up Attracting Force Between Bodies]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43673#p43673"><![CDATA[
A few things:<br><br><strong class="text-strong">(1)</strong> You might have more success if you move your question to the <a href="https://pybullet.org/Bullet/phpBB3/viewforum.php?f=24" class="postlink">PyBullet Support and Feedback</a> section of this forum.  This <strong class="text-strong">General Biullet Physics Support and Feedback</strong> section is more about the C++ API.<br><br><strong class="text-strong">(2)</strong> Are you sure you want to perform your simulation using PyBullet rather than C++?  You'll experience better performance under C++.  Also, I have an idea how you might go about it within the C++ API...<br><br><strong class="text-strong">(3)</strong> ... in short you could create a single custom class (let's call it <strong class="text-strong">ElectricFieldAction</strong>) derived from the pure virtual <strong class="text-strong">btActionInterface</strong>.  You would implement its <strong class="text-strong">ElectricFieldAction::updateAction(btCollisionWorld* collisionWorld, btScalar deltaTimeStep)</strong> method to push the dipole objects around.  Then you would instantiate an <strong class="text-strong">ElectricFieldAction</strong> instance and add it to the <strong class="text-strong">world</strong>:<div class="codebox"><p>Code: </p><pre><code>ElectricFieldAction action = ElectricFieldAction();world-&gt;addAction(&amp;action);</code></pre></div>The Bullet API will then call <strong class="text-strong">action.updateAction(world, deltaTimeStep)</strong> every substep of the simulation.  This happens after the integration, collision resolution, and object deactivation phases of the substep.<br><br><strong class="text-strong">(4)</strong> It is possible PyBullet exposes the ability to create custom Actions like that: dunno.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11033">drleviathan</a> — Thu Oct 28, 2021 6:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[jzhong2]]></name></author>
		<updated>2021-10-28T15:51:43+00:00</updated>

		<published>2021-10-28T15:51:43+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43671#p43671</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43671#p43671"/>
		<title type="html"><![CDATA[Setting Up Attracting Force Between Bodies]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43671#p43671"><![CDATA[
Hi there! I am new to pybullet, and am trying to find a way to simulate collisions between spheres/boxes with dipoles (which just means they can attract or repel each other at one specific point). I am able to create the bodies, but am currently stuck at figuring out how to set up this dipole moment on them. I read the quick start guide but it seems like pybullet still don't have this feature yet...? I'm so sorry for the probably intuitive question, I'm just a desperate undergraduate not knowing a way to initiate their capstone project  <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14127">jzhong2</a> — Thu Oct 28, 2021 3:51 pm</p><hr />
]]></content>
	</entry>
	</feed>
