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

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

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

		<entry>
		<author><name><![CDATA[AdamEisfeld]]></name></author>
		<updated>2020-11-26T18:27:26+00:00</updated>

		<published>2020-11-26T18:27:26+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43197#p43197</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43197#p43197"/>
		<title type="html"><![CDATA[Re: Convert vec3 AngularVelocity to vec4?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43197#p43197"><![CDATA[
Ah I see, this makes much more sense! Thank you for the quick response.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13670">AdamEisfeld</a> — Thu Nov 26, 2020 6:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drleviathan]]></name></author>
		<updated>2020-11-26T14:46:47+00:00</updated>

		<published>2020-11-26T14:46:47+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43196#p43196</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43196#p43196"/>
		<title type="html"><![CDATA[Re: Convert vec3 AngularVelocity to vec4?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43196#p43196"><![CDATA[
<blockquote class="uncited"><div>From what I understand, Bullet expresses a rigid body's angular velocity as a 3D vector, where the x, y and z components represent a rotation around the body's local x, y and z axis (a yaw, pitch, roll rotation).</div></blockquote>That is <strong class="text-strong">incorrect</strong>.  Bullet stores angular velocity as a 3D vector which points along the axis of rotation (as per the right-hand rule) and whose length is equal to the angular speed (in radians per second).  The benefit of this format is: adding two angular velocities is done via simple 3D vector math.<br><br>To convert angular velocity from Bullet to SceneKit you would compute the length and store that in <strong class="text-strong">w</strong> then divide Bullet's <strong class="text-strong">x</strong>, <strong class="text-strong">y</strong>, and <strong class="text-strong">z</strong> components by the the length <strong class="text-strong">(*)</strong> to get SceneKit's normalized axis.<br><br><strong class="text-strong">(*)</strong> Please don't divide by zero.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11033">drleviathan</a> — Thu Nov 26, 2020 2:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[AdamEisfeld]]></name></author>
		<updated>2020-11-26T04:31:34+00:00</updated>

		<published>2020-11-26T04:31:34+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43195#p43195</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43195#p43195"/>
		<title type="html"><![CDATA[Convert vec3 AngularVelocity to vec4?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43195#p43195"><![CDATA[
Prior to using Bullet, I was using SceneKit's built-in physics engine for my iOS projects. SceneKit expresses a rigid body's angular velocity as a 4D vector, where the x,y,z components describe the axis the body is currently rotating around, and the fourth w component specifies the speed the body is rotating around this axis (in radians/s I believe, but that's irrelevant to my question).<br><br>From what I understand, Bullet expresses a rigid body's angular velocity as a 3D vector, where the x, y and z components represent a rotation around the body's local x, y and z axis (a yaw, pitch, roll rotation).<br><br>I've been building a bullet physics wrapper for Swift, with support for wiring the simulation up to SceneKit, and I would like to consolidate the bridge between these 2 values (I would like users to be able to specify a 4D vector as they are used to with SceneKit, and have that get converted to the 3D vector Bullet expects). <br><br>I'm having a hard time visualizing this, and can't find much online. Are there any existing solutions out there for working with 4D vectors for angular velocities in bullet?<br><br>Thanks, <br>- Adam<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13670">AdamEisfeld</a> — Thu Nov 26, 2020 4:31 am</p><hr />
]]></content>
	</entry>
	</feed>
