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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2013-11-06T02:39:21+00:00</updated>

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

		<entry>
		<author><name><![CDATA[Mario Ruiz Perez]]></name></author>
		<updated>2013-11-06T02:39:21+00:00</updated>

		<published>2013-11-06T02:39:21+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=32101#p32101</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=32101#p32101"/>
		<title type="html"><![CDATA[Vehicle and wheel with entity]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=32101#p32101"><![CDATA[
Hello guys, I am working in a simulator of vehicles using Ogre and Bullet, but I don't how add entities (.mesh) at the wheels.<br><br> My code is: <br>       <span style="color:#008040"> .....<br>        //Create node of vehicle and entity attached at vehicle.<br>        .....<br><br>        m_physicsWorld = physicsCtrl-&gt;getPhysicsWorld();<br>btCollisionShape* chassisShape;<br><br>//envoltura is a btvector3<br>chassisShape = new btBoxShape(envoltura);<br><br>btCompoundShape* compound = new btCompoundShape();<br><br>btTransform localTrans;<br>localTrans.setIdentity();<br>        localTrans.setOrigin(OrigenChasis);<br>compound-&gt;addChildShape(localTrans,chassisShape);<br><br>        m_carChassis = physicsCtrl-&gt;addRigidBody(this-&gt;getEntity(),compound);<br>m_carChassis-&gt;setDamping(0.2,0.2);<br><br>        m_vehicleRayCaster = new btDefaultVehicleRaycaster(m_physicsWorld);<br>m_vehicle = new btRaycastVehicle(m_tuning,m_carChassis,m_vehicleRayCaster);<br>        m_physicsWorld-&gt;addVehicle(m_vehicle);<br><br>m_vehicle-&gt;setCoordinateSystem(0,1,2);<br><br>       bool isFrontWheel;<br><br>       isFrontWheel = true;<br>//R0<br>btVector3 connectionPointCS0(CUBE_HALF_EXTENTS-(ConexionRueda0.x *  gWheelWidth),ConexionRueda0.y,ConexionRueda0.z);<br>m_vehicle-&gt;addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,gSuspensionRestLength,gWheelRadius,m_tuning,isFrontWheel);<br><br>//R1<br>connectionPointCS0 = btVector3(-CUBE_HALF_EXTENTS+(ConexionRueda1.x*gWheelWidth), ConexionRueda1.y, ConexionRueda1.z);<br>m_vehicle-&gt;addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,gSuspensionRestLength,gWheelRadius,m_tuning,isFrontWheel);<br><br>isFrontWheel = false;<br><br>//R2<br>//connectionPointCS0 = btVector3(-CUBE_HALF_EXTENTS+(-3.3*gWheelWidth),connectionHeight,-2*CUBE_HALF_EXTENTS+gWheelRadius);<br>connectionPointCS0 = btVector3(-CUBE_HALF_EXTENTS+(ConexionRueda2.x*gWheelWidth),ConexionRueda2.y,ConexionRueda2.z);<br>m_vehicle-&gt;addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,gSuspensionRestLength,gWheelRadius,m_tuning,isFrontWheel);<br><br>//R3<br>//connectionPointCS0 = btVector3(CUBE_HALF_EXTENTS-(-4.3*gWheelWidth), connectionHeight, -2*CUBE_HALF_EXTENTS+gWheelRadius);<br>connectionPointCS0 = btVector3(CUBE_HALF_EXTENTS-(ConexionRueda3.x*gWheelWidth), ConexionRueda3.y, ConexionRueda3.z);<br>m_vehicle-&gt;addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,gSuspensionRestLength,gWheelRadius,m_tuning,isFrontWheel);<br><br></span><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=10511">Mario Ruiz Perez</a> — Wed Nov 06, 2013 2:39 am</p><hr />
]]></content>
	</entry>
	</feed>
