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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2006-03-08T05:59:33+00:00</updated>

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

		<entry>
		<author><name><![CDATA[John McCutchan]]></name></author>
		<updated>2006-03-08T05:59:33+00:00</updated>

		<published>2006-03-08T05:59:33+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=760#p760</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=760#p760"/>
		<title type="html"><![CDATA[A Simple Constraints System]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=760#p760"><![CDATA[
read kenny's thesis. You can find it in the forums.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=148">John McCutchan</a> — Wed Mar 08, 2006 5:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gfaraj]]></name></author>
		<updated>2006-03-08T04:00:07+00:00</updated>

		<published>2006-03-08T04:00:07+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=757#p757</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=757#p757"/>
		<title type="html"><![CDATA[A Simple Constraints System]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=757#p757"><![CDATA[
Hello, I am trying to make a simple yet powerful-enough constraints system for a game physics engine. I already have simple collision detection and response using rigid bodies. I have looked for examples or tutorials on how to implement constraints, but have not found much. <br><br>I read Thomas Jakobsen's article in Gamasutra (<a href="http://www.gamasutra.com/resource_guide/20030121/jacobson_01.shtml" class="postlink">http://www.gamasutra.com/resource_guide ... n_01.shtml</a>) but I don't think I can implement a Verlet integrator the way I have been handling movement in my engine. I use impulses to move the rigid bodies. So what I need is an example of how to implement constraints in this kind of system. Can anyone point me in the right direction?<br><br>I'm using a simple Euler integrator at the moment (thinking of writing a Runge-Kutta integrator soon):<br><div class="codebox"><p>Code: </p><pre><code>        void BeEulerIntegrator::Integrate(BeRigidBody* Body, Float DeltaTime)        {            // Should we mess with this body?            if (!Body-&gt;IsDynamic() || Body-&gt;IsFlagSet(BeRigidBodyFlags::DISABLED) ||                 Body-&gt;Mass() &lt; MathUtil::BE_EPSILON || !Body-&gt;Scene())                return;            BeVector3 Force;            BeVector3 Torque;            // Linear dynamics            // ---------------            Force = Body-&gt;Force() + Body-&gt;ImpulseForce();            if (!Body-&gt;IsFlagSet(BeRigidBodyFlags::NO_GRAVITY))                Force += Body-&gt;Scene()-&gt;Gravity() * Body-&gt;Mass();                        Body-&gt;AddLinearMomentum(Force * DeltaTime);            Body-&gt;Translate(Body-&gt;LinearVelocity() * DeltaTime);            // Angular dynamics            // ----------------            Torque = Body-&gt;Torque() + Body-&gt;ImpulseTorque();            Body-&gt;AddAngularMomentum(Torque * DeltaTime);            BeQuaternion kW = BeQuaternion(Body-&gt;AngularVelocity().x(),                                           Body-&gt;AngularVelocity().y(),                                           Body-&gt;AngularVelocity().z(),                                           0.0f);            BeQuaternion kA1DQDT = 0.5f * kW * Body-&gt;QOrientation();            Body-&gt;SetQOrientation(Body-&gt;QOrientation() + DeltaTime * kA1DQDT);            // Reset impulses            Body-&gt;SetImpulseForce(BeVector3::Zero);            Body-&gt;SetImpulseTorque(BeVector3::Zero);        } </code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=441">gfaraj</a> — Wed Mar 08, 2006 4:00 am</p><hr />
]]></content>
	</entry>
	</feed>
