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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2007-12-05T01:36:16+00:00</updated>

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

		<entry>
		<author><name><![CDATA[GLphyX]]></name></author>
		<updated>2007-12-05T01:36:16+00:00</updated>

		<published>2007-12-05T01:36:16+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=6618#p6618</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=6618#p6618"/>
		<title type="html"><![CDATA[Bullet First Person Camera with Collision]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=6618#p6618"><![CDATA[
Can someone please help im kinda stuck, like the subject of this topic imply im trying to implement a first person camera using bullet. My problem is that I cannot find on method to be capable to do it... here's my code below and the problem that I meet for all of them, the following code use cylinder, but I also try with sphere and cube without success... can someone point me out what Im doing wrong or give me an example how to get it done...<br><br>Tks in advance,<br><br>Cheers!<br><br><div class="codebox"><p>Code: </p><pre><code>......camera-&gt;shape = new btCylinderShapeZ( btVector3( 1.0, 0.0, 2.0 ) );camera-&gt;shape-&gt;setMargin( 0.5 );trans.setIdentity();camera-&gt;motion = new btDefaultMotionState( trans );camera-&gt;shape-&gt;calculateLocalInertia( 80.0, inertia );camera-&gt;body = new btRigidBody( 80.0, camera-&gt;motion, camera-&gt;shape, inertia, (btScalar)10.0, (btScalar)10.0, (btScalar)10.0, (btScalar)10.0 );camera-&gt;body-&gt;setAngularFactor( 0.0 );world-&gt;addRigidBody( camera-&gt;body );......// Front &amp; Back ~ Working but because of the translation motion when// I go to a corner and forward I got some major jaggin....camera-&gt;body-&gt;translate( btVector3( ( _dir * camera-&gt;dir-&gt;x ) / camera-&gt;speed,  ( _dir * camera-&gt;dir-&gt;y ) / camera-&gt;speed,  0.0 ) );/*// Work but cannot stay stable when climbing stairscamera-&gt;body-&gt;internalApplyImpulse( btVector3( -camera-&gt;vel-&gt;x,     -camera-&gt;vel-&gt;y,     0.5 ),     btVector3( 0.0, 0.0, 0.0 ),     0.25 );*//*// Work but cannot climb stairs or ramps ( this is the one that give the most smooth result but...)camera-&gt;body-&gt;internalApplyImpulse( btVector3( -camera-&gt;vel-&gt;x,   -camera-&gt;vel-&gt;y,   0.0 ),btVector3( 0.0, 0.0, 0.0 ),    0.25 );*//*// Work but cannot climb stairs or rampscamera-&gt;body-&gt;applyImpulse(  btVector3( -camera-&gt;vel-&gt;x * camera-&gt;speed, -camera-&gt;vel-&gt;y * camera-&gt;speed, -1.0 ), btVector3( camera-&gt;pos-&gt;x,camera-&gt;pos-&gt;y,camera-&gt;pos-&gt;z ) );*//*// Work but cannot climb stairs or rampscamera-&gt;body-&gt;setLinearVelocity( btVector3( -camera-&gt;vel-&gt;x * camera-&gt;speed,    -camera-&gt;vel-&gt;y * camera-&gt;speed,      -10.0 ) );*/......</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2065">GLphyX</a> — Wed Dec 05, 2007 1:36 am</p><hr />
]]></content>
	</entry>
	</feed>
