<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Maratis forum - Animated physics shell]]></title>
		<link>http://forum.maratis3d.com/viewtopic.php?id=1091</link>
		<description><![CDATA[The most recent posts in Animated physics shell.]]></description>
		<lastBuildDate>Tue, 11 Nov 2014 17:08:20 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Animated physics shell]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=7398#p7398</link>
			<description><![CDATA[<p>Hi cygorx,</p><p>the physics engine keeps it&#039;s own data in memory for the collision mesh, so it&#039;s not easy to update the mesh every frame to match the mesh&#039;s animation.</p><p>It&#039;s preferable to transform the object dynamically in lua (or c++) instead of using bones animation and skinning.</p><p>Something like that :</p><div class="codebox"><pre><code>   object = getObject(&quot;object&quot;) 
   object_startPos = getPosition(object)

   t = 0

   -- Scene update
   function onSceneUpdate()
       
      z =  math.cos(t*0.1)*2 -- move up and down
      setPosition(object, object_startPos + vec3(0, 0, z))
       
      t = t+1

   end</code></pre></div><p>To apply it to multiple objects easily, you can use object programming : <a href="http://wiki.maratis3d.org/index.php?title=Lua_object_programming_example">http://wiki.maratis3d.org/index.php?tit &#133; ng_example</a></p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Tue, 11 Nov 2014 17:08:20 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=7398#p7398</guid>
		</item>
		<item>
			<title><![CDATA[Animated physics shell]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=7397#p7397</link>
			<description><![CDATA[<p>So, you&#039;ll see in the video, i am trying to make an area where you have to jump across islands floating in lava to get across, and every other island is sinking in and out so you have to time it right so it doesn&#039;t take you into the lava with it. However, i enabled physics and set the shape of the islands to triangle-mesh but the area recognized as the island stays as the first frame, even when the island has moved down. How can i make it so the shape moves with the object? I can&#039;t really explain it well but you&#039;ll see in the video, once the island moves down, the character just floats there. <br /><a href="https://www.youtube.com/watch?v=lneKkJXFWdY&amp;feature=youtu.be">https://www.youtube.com/watch?v=lneKkJX &#133; e=youtu.be</a><br />P.s this is just a test environment so pay no attention to anything else around the lava. And yes, i did just drop my environment into thespecialops&#039;s tutorial project for quick tests.</p>]]></description>
			<author><![CDATA[dummy@example.com (cygorx)]]></author>
			<pubDate>Tue, 11 Nov 2014 16:49:32 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=7397#p7397</guid>
		</item>
	</channel>
</rss>
