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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2020-07-29T11:13:55+00:00</updated>

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

		<entry>
		<author><name><![CDATA[sun_stealer]]></name></author>
		<updated>2020-07-29T11:13:55+00:00</updated>

		<published>2020-07-29T11:13:55+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43054#p43054</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43054#p43054"/>
		<title type="html"><![CDATA[Capsule collider orientation with btKinematicCharacterController]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43054#p43054"><![CDATA[
Maybe I am missing something, but it seems like Bullet (just like 3D rendering engine I'm using) uses Y-up coordinate frame.<br>I followed some demos online and created a btKinematicCharacterController object, but DebugDraw shows that the capsule is aligned with a horizontal rather than vertical axis, even though it's supposed to be upright according to the documentation.<br><br>Using btCapsuleShapeZ instead of btCapsuleShape seems to fix the issue, but it seems like a hack.<br><br>Is this caused by the wrong orientation of the ghost object?<br><br>In general, I am struggling a lot with btKinematicCharacterController. I know it is not supported, but does anyone have a working demo with a character controller driven by Bullet? Can you give me general advice on how to get something working without writing an FPS controller from scratch?<br><br>Below is the code that I currently use to create the character:<div class="codebox"><p>Code: </p><pre><code>    btTransform startTransform;    startTransform.setIdentity ();    startTransform.setOrigin (btVector3(1.5, 12.0, 0.5));    ghostObject.setWorldTransform(startTransform);    btScalar characterHeight = 1.75;    btScalar characterWidth = 0.5;    capsuleShape = std::make_unique&lt;btCapsuleShape&gt;(characterWidth, characterHeight);    ghostObject.setCollisionShape(capsuleShape.get());    ghostObject.setCollisionFlags(btCollisionObject::CF_CHARACTER_OBJECT);    auto stepHeight = btScalar(0.35);    bCharacter = std::make_unique&lt;btKinematicCharacterController&gt;(&amp;ghostObject, capsuleShape.get(), stepHeight, btVector3(0.0, 1.0, 0.0));    bCharacter-&gt;setGravity(btVector3(0, -9.8f, 0));    bWorld.addCollisionObject(&amp;ghostObject, btBroadphaseProxy::CharacterFilter, btBroadphaseProxy::StaticFilter|btBroadphaseProxy::DefaultFilter);    bWorld.addAction(bCharacter.get());</code></pre></div><div class="inline-attachment"><dl class="file"><dt class="attach-image"><img src="https://pybullet.org/Bullet/phpBB3/download/file.php?id=1838" class="postimage" alt="Screenshot from 2020-07-29 04-03-46.png" onclick="viewableArea(this);" /></dt></dl></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13734">sun_stealer</a> — Wed Jul 29, 2020 11:13 am</p><hr />
]]></content>
	</entry>
	</feed>
