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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2021-06-26T18:51:04+00:00</updated>

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

		<entry>
		<author><name><![CDATA[RisaStenr]]></name></author>
		<updated>2021-06-26T18:51:04+00:00</updated>

		<published>2021-06-26T18:51:04+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43463#p43463</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43463#p43463"/>
		<title type="html"><![CDATA[Re: Setting initial rotation of transform (motionstate)]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43463#p43463"><![CDATA[
OK so it looks like what I was doing was correct, but bullet didn't like that i set the initial rotation to zeroes.  After adjusting the rotation to be a small number, it works.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14017">RisaStenr</a> — Sat Jun 26, 2021 6:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[RisaStenr]]></name></author>
		<updated>2021-06-26T02:36:43+00:00</updated>

		<published>2021-06-26T02:36:43+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43462#p43462</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43462#p43462"/>
		<title type="html"><![CDATA[Setting initial rotation of transform (motionstate)]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43462#p43462"><![CDATA[
I am trying to set the initial rotation of a btTransform using x, y, z and w.<br><div class="codebox"><p>Code: </p><pre><code>MotionState::MotionState(object *_object) : m_pObject(object){float x = m_pObject-&gt;getPosition().x;float y = m_pObject-&gt;getPosition().y;float z = m_pObject-&gt;getPosition().z;float qx = m_pObject-&gt;getRotation().q.x;float qy = m_pObject-&gt;getRotation().q.y;float qz = m_pObject-&gt;getRotation().q.z;float qw = m_pObject-&gt;getRotation().q.w;btTransform transform;transform.setIdentity();transform.setOrigin({ x, y, z });transform.setRotation({ qx, qy, qz, qw });m_Pos1 = transform;}</code></pre></div>The above code does not display the objects and crashes when I advance the physics.<br>The code worked (objects showed and moved) when I didnt set the rotation (ie I just set the origin or location).<br>How would I go about setting the initial rotation of the object?  I am using motionstates and read in one of the manuals this was the way to do it, but I can't figure out how to set the rotation.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14017">RisaStenr</a> — Sat Jun 26, 2021 2:36 am</p><hr />
]]></content>
	</entry>
	</feed>
