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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2020-07-15T17:59:50+00:00</updated>

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

		<entry>
		<author><name><![CDATA[gruncdan]]></name></author>
		<updated>2020-07-15T17:59:50+00:00</updated>

		<published>2020-07-15T17:59:50+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43036#p43036</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43036#p43036"/>
		<title type="html"><![CDATA[heightfield bounding box size is 0]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43036#p43036"><![CDATA[
I have static bt heightfield in my physics world, and a dynamic cube. Cube pases trough the heightfield, but not trough static plane.<br>After some messing around I found out that the bounding box of the heightfield is (0 0 -0),(0 0 0).<br>When using malloc, even nan apears.<br>Seems to me, that the heightfield is somehow wrongly initialized.<br><br>This is my temporary code for adding heightfield to the physics world:<div class="codebox"><p>Code: </p><pre><code>collider[16]={0};collider[0]=2.0f;collider[1]=1.0f;collider[2]=0.0f;collider[3]=0.0f;collider[4]=0.0f;collider[5]=1.0f;collider[6]=1.0f;collider[7]=0.0f;collider[8]=0.0f;collider[9]=1.0f;collider[10]=1.0f;collider[11]=0.0f;collider[12]=0.0f;collider[13]=5.0f;collider[14]=5.0f;collider[15]=0.0f;btTransform t3;t3.setRotation(btQuaternion(0,0,0));t3.setOrigin(btVector3(0,5,0));//t3.setOrigin(btVector3(0,1,-5));//t3.getBasisbtHeightfieldTerrainShape*terrain1=new btHeightfieldTerrainShape(4,4,(void*)collider,1,-1.0f,10.0f,1,PHY_FLOAT,true);terrain1-&gt;setUseDiamondSubdivision();btDefaultMotionState*motion1=new btDefaultMotionState(t3);btRigidBody::btRigidBodyConstructionInfo info1(0.0,motion1,terrain1);btRigidBody*body1=new btRigidBody(info1);dynamicsWorld-&gt;addRigidBody(body1);</code></pre></div>Thanks for any advice.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13719">gruncdan</a> — Wed Jul 15, 2020 5:59 pm</p><hr />
]]></content>
	</entry>
	</feed>
