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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2005-08-28T11:55:24+00:00</updated>

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

		<entry>
		<author><name><![CDATA[bandoler]]></name></author>
		<updated>2005-08-28T11:55:24+00:00</updated>

		<published>2005-08-28T11:55:24+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=273#p273</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=273#p273"/>
		<title type="html"><![CDATA[Girona game engine in blender]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=273#p273"><![CDATA[
Hi, i'm making progress with my own game engine inside blender. I'm using bullet for it, and i'm having some issues to solve. The latest info and shots from the tests are in:<br><br><a href="http://www.blender.org/forum/viewtopic.php?p=42558#42558" class="postlink">http://www.blender.org/forum/viewtopic. ... 2558#42558</a><br><br>My problem is that i have a dynamic platform that i controll using the keyboard to inclinate it. On this platform there is an object spinning around. When i set the new position of the platform, sometimes it penetrates the object, and makes it jump high, or even fall through.<br><br>I'm not sure of the right way to do this, i've implemented myself the following code:<br><div class="codebox"><p>Code: </p><pre><code>voidCcdPhysicsController::setOrientation(float quatImag0,float quatImag1,float quatImag2,float quatReal){// added by bandoler. don't trust thisSimdTransform xform = m_body-&gt;getCenterOfMassTransform();xform.setRotation( SimdQuaternion(quatImag0,quatImag1,quatImag2,quatReal) );this-&gt;m_body-&gt;setCenterOfMassTransform(xform);}voidCcdPhysicsController::setPosition(float posX,float posY,float posZ){// added by bandoler. don't trust thisSimdTransform xform = m_body-&gt;getCenterOfMassTransform();xform.setOrigin( SimdVector3(posX,posY,posZ) );this-&gt;m_body-&gt;setCenterOfMassTransform(xform);}</code></pre></div>Bcause i was using the first version of blender with bullet. maybe it is working better now. I should probably update, but as ie branched some files, it requires some work.<br><br>Also, i'm calling the update on the physics engine once per frame, and i suppose this has to be more complex than this... My main loop looks like:<br><div class="codebox"><p>Code: </p><pre><code>while (!lExit){double lCurrentTime = PIL_check_seconds_timer();double lDeltaTime = lCurrentTime - lLastTime;lLastTime = lCurrentTime;// Process eventslExit = lEngine-&gt;ProcessEvents();// Process logic pipelinesfor ( unsigned int i=0;i&lt;lLogicPipelines.size(); i++ )lLogicPipelines[i]-&gt;Run();// Run the physicslEngine-&gt;iPhysicsEnvironment-&gt;beginFrame();lEngine-&gt;iPhysicsEnvironment-&gt;proceedDeltaTime( lCurrentTime, lDeltaTime );lEngine-&gt;iPhysicsEnvironment-&gt;endFrame();// Run the graphics pipelineget_render_pipeline()-&gt;Run();}</code></pre></div>in the logic pipelines i update the position due to user interaction.<br><br>(bandoler)<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=19">bandoler</a> — Sun Aug 28, 2005 11:55 am</p><hr />
]]></content>
	</entry>
	</feed>
