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

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

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

		<entry>
		<author><name><![CDATA[bone]]></name></author>
		<updated>2007-03-20T15:03:10+00:00</updated>

		<published>2007-03-20T15:03:10+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3967#p3967</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3967#p3967"/>
		<title type="html"><![CDATA[Box stays on edge/rotates up to be on corner.]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3967#p3967"><![CDATA[
... or alternately, try:<br><br><a href="http://www.essentialmath.com/AngularImpulse.pdf" class="postlink">http://www.essentialmath.com/AngularImpulse.pdf</a><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=1626">bone</a> — Tue Mar 20, 2007 3:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[bone]]></name></author>
		<updated>2007-03-20T14:16:07+00:00</updated>

		<published>2007-03-20T14:16:07+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3965#p3965</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3965#p3965"/>
		<title type="html"><![CDATA[Re: Box stays on edge/rotates up to be on corner.]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3965#p3965"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>CorrectionTorque = ArmInWorldSpace cross CorrectionVelocity</code></pre></div>[/i][/code]</div></blockquote>It appears that you are trying to create an impulse, but this isn't quite the right equation to do so.<br><br>One way to do it is to determine the "effective mass" (my terminology but probably not the correct terminology) when trying to push your object away from the collision at the collision point.  Then you divide the CorrectionVelocity by the effective mass to create an impulse.  Then apply the impulse as you assumably are doing now.<br><br>This is how I compute the effective mass given a world offset and world normal:<br><br>cross1 = CrossProduct( worldOffset, worldNormal )<br>temp = I^-1 * cross1   // I^-1 being the inverse inertia tensor<br>cross2 = CrossProduct( temp, worldOffset )<br>effMass = DotProduct( cross2, worldNormal ) + 1/mass<br><br>so then: impulse = correctionVelocity / effMass<br><br>I believe the above method includes the gyro terms which many game physics engines ignore ... I'm not exactly sure how to remove the gyro term from this method, but it's undoubtedly faster if you do.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=1626">bone</a> — Tue Mar 20, 2007 2:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Buzzer]]></name></author>
		<updated>2007-03-19T18:21:21+00:00</updated>

		<published>2007-03-19T18:21:21+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3956#p3956</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3956#p3956"/>
		<title type="html"><![CDATA[Box stays on edge/rotates up to be on corner.]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3956#p3956"><![CDATA[
I have a simple, handmade physics code.<br>Basically I have a concave heightfield for the ground, and box that I'm trying to drop on it.<br><br>For simplicities sake, I decided only the corners of the box were substainatal.  I binary search through time in order to find the collision point(s).<br><br>Once I do, I go through each corner, and, if it is within a certain distance of the ground it is directly over, I compute the following<div class="codebox"><p>Code: </p><pre><code>ComponentOfLinearVelocityFromAngular = AngularVelocity cross ArmInWorldSpaceLinearVelocity = PureLinearVelocity + ComponentOfLinearVelocityFromAngularNormalVelocity = LinearSpeed projected onto Normal.TangentalVelocity = LinearVelocity - NormalVelocityCorrectionVelocity = -1.5 * NormalVelocity;CorrectionTorque = ArmInWorldSpace cross CorrectionVelocity</code></pre></div>I sum these over any corners that are touching an take the average.  This works a good potion of the time, but often the box rotates up to rest on one corner, or less frequently on an edge.<br><br>Any ideas?[/i][/code]<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=1605">Buzzer</a> — Mon Mar 19, 2007 6:21 pm</p><hr />
]]></content>
	</entry>
	</feed>
