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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2023-02-08T21:06:47+00:00</updated>

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

		<entry>
		<author><name><![CDATA[ed_welch]]></name></author>
		<updated>2023-02-08T21:06:47+00:00</updated>

		<published>2023-02-08T21:06:47+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44238#p44238</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44238#p44238"/>
		<title type="html"><![CDATA[Bizarre behaviour setting position of btRigidBody]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44238#p44238"><![CDATA[
I discovered some bizzarre behaviour of a btRigidBody (with CF_KINEMATIC_OBJECT flag) when you try to set the position of the object.<br>If set activation state to ISLAND_SLEEPING, then the position can be modified with this code:<br>btTransform&amp; t = m_pRigidBody-&gt;getWorldTransform();<br>t.setOrigin(btVector3(m_x, m_y, m_z));<br><br>however if activation state is DISABLE_SIMULATION the above code does not work. The only way to update position is as follows:<br>btTransform&amp; t = m_pRigidBody-&gt;getWorldTransform();<br>t.setOrigin(btVector3(m_x, m_y, m_z));<br>m_pRigidBody-&gt;getMotionState()-&gt;setWorldTransform(t);<br>m_pRigidBody-&gt;getWorldTransform().setIdentity();<br>m_pRigidBody-&gt;getWorldTransform().setOrigin(btVector3(m_x, m_y, m_z));<br><br>even if you remove the line m_pRigidBody-&gt;getMotionState()-&gt;setWorldTransform(t) it will not work, which makes no sense<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11234">ed_welch</a> — Wed Feb 08, 2023 9:06 pm</p><hr />
]]></content>
	</entry>
	</feed>
