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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2011-10-23T09:31:47+00:00</updated>

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

		<entry>
		<author><name><![CDATA[JohnBoyMan]]></name></author>
		<updated>2011-10-23T09:31:47+00:00</updated>

		<published>2011-10-23T09:31:47+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25941#p25941</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25941#p25941"/>
		<title type="html"><![CDATA[btConvexHullShape]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=25941#p25941"><![CDATA[
Hello. I am trying to make a mesh into a bullet shape with this code first.<div class="codebox"><p>Code: </p><pre><code>btVector3 verts[4];verts[0] = btVector3(mW[k2].x+0,  5  ,mW[k2].y +0);   //&lt;-------mW = mouse positions plus offset.verts[1] = btVector3(mW[k2].x+0,  5  ,mW[k2].y-10);verts[2] = btVector3(mW[k2].x-20, -5 ,mW[k2].y-10);verts[3] = btVector3(mW[k2].x-20, -5 ,mW[k2].y -0);btConvexHullShape * shape = new btConvexHullShape();//add the points to the shapefor ( int ii=0; ii&lt;4; ++ii ){shape-&gt;addPoint( verts[ii] );        }    btTransform groundTransform11;    groundTransform11.setIdentity();    groundTransform11.setOrigin(btVector3(BtOgre::Convert::toBullet( mW[k2] + Ogre::Vector3( 0,6,0 ) )));    btScalar mass1( 0.0 );    //bool isDynamic1 = ( mass1 != 0.f );  btVector3 localInertia1( 0,0,0 );    //if ( isDynamic1 )    //mGroundShape-&gt;calculateLocalInertia( mass1,localInertia );MyMotionState* motionState11 = new MyMotionState( groundTransform11,rampNode[k2] );    btRigidBody::btRigidBodyConstructionInfo rbInfo1( mass1,motionState11,shape,localInertia1 );    body7[0] = new btRigidBody( rbInfo1 );body7[0]-&gt;setFriction( 0.1f );     //body-&gt;setCollisionFlags(body-&gt;getCollisionFlags() | btCollisionObject::CF_KINEMATIC_OBJECT); // It should be kinematic    body7[0]-&gt;setActivationState(DISABLE_DEACTIVATION); //It should do it's job each and every frame//add the body to the dynamics world    //errror source of access violation called before initializd     //  rampNode[k2] -&gt;setPosition(mW[k2] + Ogre::Vector3( 0,0,0 ));//buildDynamicsworld();  dynamicsWorld-&gt;addRigidBody(body7[0]); }</code></pre></div>the shape does not show up.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=8343">JohnBoyMan</a> — Sun Oct 23, 2011 9:31 am</p><hr />
]]></content>
	</entry>
	</feed>
