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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2007-03-01T23:11:20+00:00</updated>

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

		<entry>
		<author><name><![CDATA[sridhar]]></name></author>
		<updated>2007-03-01T23:11:20+00:00</updated>

		<published>2007-03-01T23:11:20+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3697#p3697</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3697#p3697"/>
		<title type="html"><![CDATA[Box falls on its edge. It doesn't come to rest on its face]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3697#p3697"><![CDATA[
yes.....the Center of gravity(CG) is not above the edge of the box. Even then it rests on the edge, instead of resting on one of the 6 faces of a cube.<br><br>I tried to drop the box such that it makes a point contact with the groud plane. Even then immediately after making the contact, it doesnt topple and doesnt come to rest on one of the faces.<br><br>I checked the ccdphysics demo, in that demo, the boxes come to rest on one of the faces. <br><br>This is my code,<br><div class="codebox"><p>Code: </p><pre><code>btCollisionShape* boxShape = new btBoxShape(btVector3((M.x-m.x)*0.5f, (M.y-m.y)*0.5f, (M.z-m.z)*0.5f)); //need to give btVector3 of halfExtentsboxShape-&gt;setMargin(gCollisionMargin);s = mObjMgr-&gt;ObjInstances[i]-&gt;Scale;boxShape-&gt;setLocalScaling(btVector3(s, s, s));btRigidBody* BTWorld::LocalCreateRigidBody(float mass, const btTransform&amp; startTransform, btCollisionShape* shape){//rigidbody is dynamic if and only if mass is non zero, otherwise staticbool isDynamic = (mass != 0.f);btVector3 localInertia(0,0,0);if (isDynamic)shape-&gt;calculateLocalInertia(mass,localInertia);//using motionstate is recommended, it provides interpolation capabilities, and only synchronizes 'active' objects//btMotionState allows the dynamics world to synchronize the updated world transforms with graphics objects//#define USE_MOTIONSTATE 1//#ifdef USE_MOTIONSTATEbtDefaultMotionState* myMotionState = new btDefaultMotionState(startTransform);myMotionState-&gt;setWorldTransform(startTransform);btRigidBody* body = new btRigidBody(mass,myMotionState,shape,localInertia);body-&gt;setCenterOfMassTransform(startTransform);//#else//btRigidBody* body = new btRigidBody(mass,startTransform,shape,localInertia);//#endifassert(mDynamicsWorld);assert(body);mDynamicsWorld-&gt;addRigidBody(body);return body;}</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=1642">sridhar</a> — Thu Mar 01, 2007 11:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2007-03-01T22:33:31+00:00</updated>

		<published>2007-03-01T22:33:31+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3696#p3696</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3696#p3696"/>
		<title type="html"><![CDATA[Box falls on its edge. It doesn't come to rest on its face]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3696#p3696"><![CDATA[
This is a 'Bullet' specific topic, so I moved it to the Bullet section.<br><br>Can you reproduce this in the CcdPhysicsDemo? Do you have any screenshot, or a movie of your simulation?<br><br>Is the object deactivated when at rest? Please try to press 'd' to disable sleeping to see what happens.<br><br>Thanks,<br>Erwin<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Thu Mar 01, 2007 10:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2007-03-01T21:45:34+00:00</updated>

		<published>2007-03-01T21:45:34+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3694#p3694</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3694#p3694"/>
		<title type="html"><![CDATA[Box falls on its edge. It doesn't come to rest on its face]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3694#p3694"><![CDATA[
yes, otherwise you introduce of course a torque and the box will come to rest on its side<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14">Dirk Gregorius</a> — Thu Mar 01, 2007 9:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[bone]]></name></author>
		<updated>2007-03-01T21:37:52+00:00</updated>

		<published>2007-03-01T21:37:52+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3692#p3692</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3692#p3692"/>
		<title type="html"><![CDATA[Box falls on its edge. It doesn't come to rest on its face]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3692#p3692"><![CDATA[
... assuming the CG is directly above the edge, yes?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=1626">bone</a> — Thu Mar 01, 2007 9:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2007-03-01T20:24:16+00:00</updated>

		<published>2007-03-01T20:24:16+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3688#p3688</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3688#p3688"/>
		<title type="html"><![CDATA[Box falls on its edge. It doesn't come to rest on its face]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3688#p3688"><![CDATA[
Well in a perfect mathematical world if you drop a box on the edge it comes indeed to rest on the edge.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14">Dirk Gregorius</a> — Thu Mar 01, 2007 8:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sridhar]]></name></author>
		<updated>2007-03-01T20:10:27+00:00</updated>

		<published>2007-03-01T20:10:27+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3685#p3685</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3685#p3685"/>
		<title type="html"><![CDATA[Box falls on its edge. It doesn't come to rest on its face]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3685#p3685"><![CDATA[
Hi,<br><br>In my application, i have modelled a simple cube as a BOX-PROXY_SHAPE and am using discrete dynamics. The cube falls under gravity on a groundplane and doesnt come to rest on its face.<br><br>I tried implementing this by using the ccdphysicsdemo application as my guideline.<br><br>The cube comes to rest with its edge in contact with the gorundplane....and not the face. So the simulation is not realistic.<br><br><br>Kindly help me in this regard.<br><br>Thanx,<br>Sridhar.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=1642">sridhar</a> — Thu Mar 01, 2007 8:10 pm</p><hr />
]]></content>
	</entry>
	</feed>
