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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2014-05-05T01:55:26+00:00</updated>

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

		<entry>
		<author><name><![CDATA[Athos06]]></name></author>
		<updated>2014-05-05T01:55:26+00:00</updated>

		<published>2014-05-05T01:55:26+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=33425#p33425</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=33425#p33425"/>
		<title type="html"><![CDATA[kinematic motion state not synchronizing correctly]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=33425#p33425"><![CDATA[
I have some kinematic bodies that I move through game logic/animations,  and then I use the motion state on each update to synchronize the kinematic rigidbody, but the thing is it isnt syncrhonized correctly, its always behind the rendering representation, just like there was some kind of offset.<br><br>You can see it in the video (select hd since the debug boxes are difficult to see), the blue moving platforms and objects.<br><br><a href="https://www.youtube.com/watch?v=daAFLZjyrG4&amp;feature=youtu.be" class="postlink">https://www.youtube.com/watch?v=daAFLZj ... e=youtu.be</a><br><br>Im using the same motionstate as here <a href="http://www.bulletphysics.org/mediawiki-1.5.8/index.php?title=MotionStates" class="postlink">http://www.bulletphysics.org/mediawiki- ... tionStates</a> since im using ogre too, and then on each update of the platforms/objects I do:<br><div class="codebox"><p>Code: </p><pre><code>m_pMotionState-&gt;setKinematicPos(btTransform( BtOgre::Convert::toBullet(m_pNode-&gt;_getDerivedOrientation()), BtOgre::Convert::toBullet(m_pNode-&gt;_getDerivedPosition())  ) );</code></pre></div>passing the node positions to the motion state to update.<br><br>I create the rigidbody like this:<div class="codebox"><p>Code: </p><pre><code>//my motion stateBtOgre::RigidBodyState* motionState = new BtOgre::RigidBodyState(pNode, btTransform(BtOgre::Convert::toBullet(rotation),BtOgre::Convert::toBullet(position)) );btRigidBody *rigidbody;btRigidBody::btRigidBodyConstructionInfo rigidbodyCI(0,motionState,collShape,btVector3(0,0,0));rigidbody = new btRigidBody(rigidbodyCI);rigidbody-&gt;setFriction(0);rigidbody-&gt;setRestitution(0);rigidbody-&gt;setActivationState(DISABLE_DEACTIVATION);rigidbody-&gt;setCollisionFlags(rigidbody-&gt;getCollisionFlags() |  btCollisionObject::CF_KINEMATIC_OBJECT);</code></pre></div>any idea of why is this happening and how can I fix it?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=10846">Athos06</a> — Mon May 05, 2014 1:55 am</p><hr />
]]></content>
	</entry>
	</feed>
