Creating a BulletCollisionShape from an .egg file
<p>I'm writing a game using Panda3D 1.10 using the <a href="http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Main_Page" rel="nofollow">Bullet Open Source Physics Library 1.5.8</a>. How do I generate a collision shape from an egg file?</p>

<p>This is the code I have so far:</p>

<pre><code>    tree = BulletRigidBodyNode('Tree')
    tree.setMass(10.0)
    shape = getCollisionFromEgg('tree.egg') # This is the 'magic function' I'm after
    tree.addShape(shape)
    np = render.attachNewNode(tree)
    np.setPos(10, 0, 2)
    self.world.attachRigidBody(tree)
    model = loader.loadModel('tree.egg')
    model.reparentTo(np)
</code></pre>