<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Maratis forum - Car collision]]></title>
		<link>http://forum.maratis3d.com/viewtopic.php?id=415</link>
		<description><![CDATA[The most recent posts in Car collision.]]></description>
		<lastBuildDate>Thu, 09 Aug 2012 14:56:48 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Car collision]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=2355#p2355</link>
			<description><![CDATA[<p>Hello, if that&#039;s just for sound on wall collision i would suggest to link a simple box on top of the car :<br />(warning : butchered example)</p><p><span class="postimg"><img src="https://dl.dropbox.com/u/19970067/MaratisShots/spaced.png" alt="PunBB bbcode test" /></span></p><p>Then in script :</p><p>bbox = getObject(&quot;bbox&quot;)<br />Sound0 = getObject(&quot;Sound0&quot;)</p><p>soundplay = 0</p><p>-- scene update<br />function onSceneUpdate()</p><p>&nbsp; &nbsp; bboxcoll = getNumCollisions(bbox)</p><p>&nbsp; &nbsp; if bboxcoll &gt;= 2 then -- you might have to change value here<br />&nbsp; &nbsp; &nbsp; &nbsp; if soundplay == 0 then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; playSound(Sound0)<br />&nbsp; &nbsp; &nbsp; &nbsp; end<br />&nbsp; &nbsp; &nbsp; &nbsp; soundplay = 1<br />&nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; soundplay = 0<br />&nbsp; &nbsp; end<br />end</p><p>Hope it helps</p>]]></description>
			<author><![CDATA[dummy@example.com (Vegas)]]></author>
			<pubDate>Thu, 09 Aug 2012 14:56:48 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=2355#p2355</guid>
		</item>
		<item>
			<title><![CDATA[Car collision]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=2346#p2346</link>
			<description><![CDATA[<p>Hello, I have been trying to work out how to make the car from the physics demo play a sound when colliding with anything that isn&#039;t itself. I&#039;d rather not have to write out if IsCollisionBetween statements for everything I want it to make a sound with colliding with. So far i&#039;ve tried using getNumCollisions with no luck. Could anyone please help?</p>]]></description>
			<author><![CDATA[dummy@example.com (Almighty Laxz)]]></author>
			<pubDate>Thu, 09 Aug 2012 08:15:03 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=2346#p2346</guid>
		</item>
	</channel>
</rss>
