Topic: Animated physics shell

So, you'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'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't really explain it well but you'll see in the video, once the island moves down, the character just floats there.
https://www.youtube.com/watch?v=lneKkJX … e=youtu.be
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's tutorial project for quick tests.

Re: Animated physics shell

Hi cygorx,

the physics engine keeps it's own data in memory for the collision mesh, so it's not easy to update the mesh every frame to match the mesh's animation.

It's preferable to transform the object dynamically in lua (or c++) instead of using bones animation and skinning.

Something like that :

   object = getObject("object") 
   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

To apply it to multiple objects easily, you can use object programming : http://wiki.maratis3d.org/index.php?tit … ng_example