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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2019-01-29T18:45:15+00:00</updated>

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

		<entry>
		<author><name><![CDATA[Mr.Rabbit]]></name></author>
		<updated>2019-01-29T18:45:15+00:00</updated>

		<published>2019-01-29T18:45:15+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41830#p41830</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41830#p41830"/>
		<title type="html"><![CDATA[Re: getWorldTransform returns NAN in Debug mode]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41830#p41830"><![CDATA[
I encountered the same bug, but in my case I get NAN in Release mode.<br><br>They are generated after stepSimulation().<br><br>If I disable compiler optimizations the nan disappears. Have you found the reason for this strange behaviour?<br><br><strong class="text-strong">Edit:</strong> I stumbled upon this remark <a href="https://stackoverflow.com/questions/28159306/libgdx-bullet-3d-and-rolling-friction-causing-nan" class="postlink">https://stackoverflow.com/questions/281 ... ausing-nan</a> . I checked if my local inertia value were correctly setup. They weren't. After I changed it to ensure a default inertia value, the simulation step dosn't generate any NAN's anymore.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13199">Mr.Rabbit</a> — Tue Jan 29, 2019 6:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[JJWong]]></name></author>
		<updated>2018-05-18T17:37:11+00:00</updated>

		<published>2018-05-18T17:37:11+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=40642#p40642</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=40642#p40642"/>
		<title type="html"><![CDATA[Re: getWorldTransform returns NAN in Debug mode]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=40642#p40642"><![CDATA[
Oh I have heard of this before, I am too wondering<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=12192">JJWong</a> — Fri May 18, 2018 5:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Droid999]]></name></author>
		<updated>2018-05-09T12:40:03+00:00</updated>

		<published>2018-05-09T12:40:03+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=40619#p40619</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=40619#p40619"/>
		<title type="html"><![CDATA[getWorldTransform returns NAN in Debug mode]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=40619#p40619"><![CDATA[
Hi<br><br>When running my program in normal mode - everything works fine - I can control my camera, and world collision is spot on.<br><br>When running in Debug mode the same code generates a NAN for each element below:<br><div class="codebox"><p>Code: </p><pre><code>//------------------------------------------------------------//// Return position of the camera after physics world processedglm::vec3 bul_returnCameraPosition()//------------------------------------------------------------{glm::vec3   tempPosition;btTransform trans;playerRigidBody-&gt;getMotionState()-&gt;getWorldTransform ( trans );tempPosition.x = trans.getOrigin().getX();tempPosition.y = trans.getOrigin().getY();tempPosition.z = trans.getOrigin().getZ();return tempPosition;}</code></pre></div>This causes an assertion failure in GLM  as it is passed an invalid value to work with. 'tempPosition' above , when in Debug mode contains three NAN's.<br><br>I am using the latest compile version from Github ( as of yesterday ).<br><br>My camera starts off with the correct position in Release mode. It starts above the map floor, and gravity brings it down to land on the plane.  Collision detection then keeps it on that plane - but only in Release mode.<br><br>My main loop looks like this:<br><div class="codebox"><p>Code: </p><pre><code>// Return the direction vector and turn this into velocity for physicsbul_setCameraVelocity(cam3_getVelocity());bul_processPhysics ( 60.0f );vel = bul_returnCameraPosition();// this contains NAN in Debug modecam3_Position = vel;cam3_CreateViewMatrix(cam3_Position);// causing an error in GLM due to bad values</code></pre></div>Any advice on how to fix this?<br><br>Thanks<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=12713">Droid999</a> — Wed May 09, 2018 12:40 pm</p><hr />
]]></content>
	</entry>
	</feed>
