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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2012-02-08T19:10:00+00:00</updated>

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

		<entry>
		<author><name><![CDATA[joaopccosta]]></name></author>
		<updated>2012-02-08T19:10:00+00:00</updated>

		<published>2012-02-08T19:10:00+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=26986#p26986</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=26986#p26986"/>
		<title type="html"><![CDATA[Re: [Solved] Ogre3d + Bullet - Sphere not rolling]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=26986#p26986"><![CDATA[
It was a problem with using env_map spherical in the ball's texture_unit in the materials script...<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=9094">joaopccosta</a> — Wed Feb 08, 2012 7:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[joaopccosta]]></name></author>
		<updated>2012-02-07T23:30:52+00:00</updated>

		<published>2012-02-07T23:30:52+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=26982#p26982</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=26982#p26982"/>
		<title type="html"><![CDATA[[Solved] Ogre3d + Bullet - Sphere not rolling]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=26982#p26982"><![CDATA[
Hi,<br><br>I have the following problem. I am using Bullet with Ogre in order to create a bowling game.<br>All the physics are perfectly fine except for one thing... When I throw the ball, it doesn't roll. In fact, it seems to slide over the bowling lane... I have tried using different method to apply impulse on the ball, fiddled with the physical properties, double checked that I am creating the correct btCollisionShape, and nothing seems to change it. <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>Sphere shape and SceneNode creation:<div class="codebox"><p>Code: </p><pre><code>// Create shape in my Physics Manager class// ...btCollisionShape aBall = new btSphereShape(1.5f);createBall("ball", Ogre::Vector3(1.5f, 1.5f, 1.5f), Ogre::Vector3(0,1.5f, -1*(arena_measures.z/2)+10), 200.0, aBall); // ...void CriterionBowling::createBall(const char *name, const Ogre::Vector3 &amp;size, const Ogre::Vector3 &amp;pos, float mass, btCollisionShape &amp;shape){// Create ogre scene nodeOgre::SceneNode* node1 = mSceneMgr-&gt;getRootSceneNode()-&gt;createChildSceneNode(name);     // Create our rigidboy using our Bullet Wrapper    btRigidBody &amp;body = mPhysics.createBody(btTransform(btQuaternion::getIdentity(), btVector3(pos.x, pos.y, pos.z)), mass, shape);// Set some physical properties//...// Add it to our bowling simulationmBall = new Ball(*node1,body);        // Get its mesh     Ogre::Entity *entity = mSceneMgr-&gt;createEntity(name, "sphere.mesh");    // Give it a texture    entity-&gt;setMaterialName("BowlingBall");    node1-&gt;attachObject(entity);}</code></pre></div>So I guess I'm doing everything right until here... correct?<br><br>Bowling ball throw and update:<div class="codebox"><p>Code: </p><pre><code>void Ball::throw(const Vector3 force){// Lock the ball --&gt; player can't control it anymorelocked = true;this-&gt;mRigidBody.activate(true);// Apply force to the rigidbodythis-&gt;mRigidBody.applyCentralImpulse(btVector3(force.x,force.y,force.z));}void Ball::update(){// Get Bullet transformation matrixbtTransform transform; // Get the transformation of this rigidbody in the transformation matrixmRigidBody.getMotionState()-&gt;getWorldTransform(transform); // Obtain the rotation and update the graphical representationbtQuaternion rotation(transform.getRotation());node.setOrientation(rotation.getW(), rotation.getX(), rotation.getY(), rotation.getZ()); // Update the positionconst btVector3 &amp;origin = transform.getOrigin();node.setPosition(origin.getX(), origin.getY(), origin.getZ());}</code></pre></div>What about this part? <br><br>I have no clue of I might be doing wrong... Could it be the physical properties of the lane floor and/or ball??<br><br>Thanks in advance!<br>Cheers, <br>Joao<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=9094">joaopccosta</a> — Tue Feb 07, 2012 11:30 pm</p><hr />
]]></content>
	</entry>
	</feed>
