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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2012-07-12T14:09:59+00:00</updated>

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

		<entry>
		<author><name><![CDATA[duncang]]></name></author>
		<updated>2012-07-12T14:09:59+00:00</updated>

		<published>2012-07-12T14:09:59+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28291#p28291</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28291#p28291"/>
		<title type="html"><![CDATA[Re: Vehicle, Wheels going all over the place]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28291#p28291"><![CDATA[
I figured out that all my issues were to do with the steering.<br><br>After making a few alterations I managed to get it working with cocos3d.<br><br>I've documented the changes here.<br><br><a href="http://ios-app-development.blogspot.co.uk/2012/07/bullet-physics-btraycastvehicle-cocos3d.html" class="postlink">http://ios-app-development.blogspot.co. ... cos3d.html</a><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=9317">duncang</a> — Thu Jul 12, 2012 2:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[duncang]]></name></author>
		<updated>2012-07-05T16:08:18+00:00</updated>

		<published>2012-07-05T16:08:18+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28239#p28239</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28239#p28239"/>
		<title type="html"><![CDATA[Vehicle, Wheels going all over the place]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=28239#p28239"><![CDATA[
Hi,<br><br>I have been trying to get a vehicle working within Cocos3d on IOS.<br><br>I have a vehicle that I can move around but the wheels go all over the place.<br><br>I thought maybe it is to do with my coordinate getting muddled up but I'm not sure<br><br>In cocos 3d.<br><br>Forward = Negative Z<br>Up = Positive Y<br>Right  = Positive X<br><br>For my vehicle I have<br><br> int rightIndex = 0;<br>    int upIndex = 1;<br>    int forwardIndex = 2;<br>    physicsObject.m_vehicle-&gt;setCoordinateSystem(rightIndex, upIndex, forwardIndex);//X，Y，Z<br><br>and for my wheels I have<br><br>  btVector3 wheelDirectionCS0(0,-1,0);<br>    btVector3 wheelAxleCS(-1,0,0);<br><br>They are then attached as follows<br><br>btVector3 connectionPointCS0(0.88f,connectionHeight,1.6f);<br>    carChassis.m_vehicle-&gt;addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,suspensionRestLength,wheelRadius,carChassis.mTuning,isFrontWheel);<br><br>etc<br><br>They are all placed correctly but when I turn left or right, they rotate on their side originally, instead of left and right.<br>and then as i move the vehicle forward as soon as I start to turn they just go all over the place..<br><br>I update the rendering of my wheels as follows<br><br><br> btQuaternion btq = object.m_vehicle-&gt;getWheelInfo(i).m_worldTransform.getRotation();<br>                btVector3 wPos = object.m_vehicle-&gt;getWheelInfo(i).m_worldTransform.getOrigin();<br>                                 CC3Vector4 quaternion;<br>                quaternion.x = btq.x();<br>                quaternion.y = btq.y();<br>                quaternion.z = btq.z();<br>                quaternion.w = btq.w();<br>                //wheel.quaternion = quaternion;<br>               <br>                <br>                switch (i) {<br>                    case 0:<br>                        wheel = object.Wheel1;<br>                        break;<br>                    case 1:<br>                        wheel = object.Wheel2;<br>                        break;<br>                    case 2:<br>                        wheel = object.Wheel3;<br>                        break;<br>                    case 3:<br>                        wheel = object.Wheel4;<br>                        break;<br>                    default:<br>                        break;<br>                }<br>                <br>                wheel.location = CC3VectorMake(wPos.getX(), wPos.getY(), wPos.getZ());<br>                wheel.quaternion = quaternion;<br><br><br>Any pointers in the right direction would be hand,<br><br>Many thanks<br><br>Duncan.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=9317">duncang</a> — Thu Jul 05, 2012 4:08 pm</p><hr />
]]></content>
	</entry>
	</feed>
