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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2009-12-13T11:20:53+00:00</updated>

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

		<entry>
		<author><name><![CDATA[rrck]]></name></author>
		<updated>2009-12-13T11:20:53+00:00</updated>

		<published>2009-12-13T11:20:53+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=16499#p16499</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=16499#p16499"/>
		<title type="html"><![CDATA[Re: Bullet integration with Cocos2D, review?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=16499#p16499"><![CDATA[
In latest Bullet trunk (or maybe even in 2.75 version) was introduced some improvements for 2D.<br>You can use setAngularFactor and setLinearFactor to limit velocities in desired axises, also was added 2D shapes, try to look Bullet/Demos/Box2dDemo<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=5644">rrck</a> — Sun Dec 13, 2009 11:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[lucaspcamargo]]></name></author>
		<updated>2009-12-12T22:45:30+00:00</updated>

		<published>2009-12-12T22:45:30+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=16495#p16495</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=16495#p16495"/>
		<title type="html"><![CDATA[Re: Bullet integration with Cocos2D, review?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=16495#p16495"><![CDATA[
<blockquote class="uncited"><div>I'm missing the math to do this, but one problem with using Bullet in a 2D game is the angular rotation is 3D of course, so when I try to map a sphere's angular rotation to a 2D projection (ie., a disk) it's not smooth; is there something better than the method I'm using</div></blockquote>Perhaps you should set the rigid body's rotation in both x and y axis to zero, every frame. This way, the simulation runs as if the rotation in those two axis were always null, which is the affect you're looking for. Try this:<br><div class="codebox"><p>Code: </p><pre><code>btTransform trans = body-&gt;getWorldTransform();btQuaternion rot = trans.getRotation();[sprite setRotation: (float) CC_RADIANS_TO_DEGREES( rot.z() )];rot.setX(0);rot.setY(0);trans.setRotation(rot);body-&gt;setWorldTransform(trans);</code></pre></div>I'm not very sure about the method names, but you got the point  <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"> <br><br>Cheers, Lucas.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=6060">lucaspcamargo</a> — Sat Dec 12, 2009 10:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[trydis]]></name></author>
		<updated>2009-11-15T06:16:19+00:00</updated>

		<published>2009-11-15T06:16:19+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=16045#p16045</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=16045#p16045"/>
		<title type="html"><![CDATA[Re: Bullet integration with Cocos2D, review?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=16045#p16045"><![CDATA[
bump<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=5894">trydis</a> — Sun Nov 15, 2009 6:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[yarri]]></name></author>
		<updated>2009-07-23T21:07:12+00:00</updated>

		<published>2009-07-23T21:07:12+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=14412#p14412</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=14412#p14412"/>
		<title type="html"><![CDATA[Bullet integration with Cocos2D, review?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=14412#p14412"><![CDATA[
Hi, sorry for the cross post but I've contributed an integration I did of Bullet to the iPhone 2D graphics engine called Cocos2D and have a few questions:<br><a href="http://www.cocos2d-iphone.org/forum/topic/841" class="postlink">http://www.cocos2d-iphone.org/forum/topic/841</a><br><br><br>Riq Quesada from Cocos2D asked for a sample app, and I just posted one for him. I used the Bullet 2.74 source and tried to follow your examples but not sure if I found the best way to do things. If you have time, would you mind reviewing for us:<br><br><a href="http://www.playngive.com/bulletCocos2D.zip" class="postlink">http://www.playngive.com/bulletCocos2D.zip</a><br><a href="http://www.playngive.com/cocos2d.zip" class="postlink">http://www.playngive.com/cocos2d.zip</a><br><br>Some questions:<br><br>- For these static world spaces, isn't there a better way to set up the AABB; I use four cubes to define the outer bounds -- should use 6 I guess, but isn't there a way to create a cube with inverted normals to contain the world more directly?<br><br>- You can see from the game the collisions aren't as precise as you'd like; increasing the step size doesn't seem to help however and I wonder if that's an issue with your 2D collision solver?<br><br>- I'm missing the math to do this, but one problem with using Bullet in a 2D game is the angular rotation is 3D of course, so when I try to map a sphere's angular rotation to a 2D projection (ie., a disk) it's not smooth; is there something better than the method I'm using:<div class="codebox"><p>Code: </p><pre><code>btTransform trans = body-&gt;getWorldTransform();btQuaternion rot = trans.getRotation();[sprite setRotation: (float) CC_RADIANS_TO_DEGREES( rot.z() )];</code></pre></div>Thanks,<br>--yarri<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=5422">yarri</a> — Thu Jul 23, 2009 9:07 pm</p><hr />
]]></content>
	</entry>
	</feed>
