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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2013-08-13T12:14:32+00:00</updated>

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

		<entry>
		<author><name><![CDATA[Anddos]]></name></author>
		<updated>2013-08-13T12:14:32+00:00</updated>

		<published>2013-08-13T12:14:32+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=31540#p31540</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=31540#p31540"/>
		<title type="html"><![CDATA[RayCast with DirectX9?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=31540#p31540"><![CDATA[
I would like to create a ray in bullet to work with DirectX,i am not sure where to start but this is an implentation of a ray cast in DirectX 9 against a .x Mesh and sets the position y height acordling to the terrain...<br><br>void Crowd::SetEntityGroundPos(D3DXVECTOR3 &amp;pos)<br>{<br>//Create the test ray<br>D3DXVECTOR3 org = pos + D3DXVECTOR3(0.0f, 10.0f, 0.0f);<br>D3DXVECTOR3 dir = D3DXVECTOR3(0.0f, -1.0f, 0.0f);<br><br>BOOL Hit;<br>DWORD FaceIndex;<br>FLOAT U;<br>FLOAT V;<br>FLOAT Dist;<br><br>//Floor-ray intersection test<br>D3DXIntersect(m_pFloor-&gt;m_pMesh, &amp;org, &amp;dir, &amp;Hit, &amp;FaceIndex, &amp;U, &amp;V, &amp;Dist, NULL, NULL);<br><br>if(Hit)<br>{<br>//Adjust position accordingly to the floor height<br>pos.y = org.y - Dist;<br>}<br>}<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=6843">Anddos</a> — Tue Aug 13, 2013 12:14 pm</p><hr />
]]></content>
	</entry>
	</feed>
