Search code examples
libgdxblender

Exporting animations with constraints from Blender to libGDX


I made a robot arm in blender, imagine two connected cylinders, hooked up to two bones. I have also animated them fine. I am able to export them as a .fbx, convert them to .g3db, and then load it in to libGDX and play the animation. So far so good.

I then added a piston between them, by following this tutorial: https://www.youtube.com/watch?v=pd1od5WPCUw

So just two cylinders with balls on the ends, with constraints pointing them at eachother when I move them around. The balls are connected to their respective bones.

This is all good, and when I play the animation in Blender the piston remains nicely lined up, and moves with everything. However when I try to export it, the parts of the piston still move with the bones, but separately (so not pointing at eachother). It seems that the constraint is not exported with the model.

Does anyone know if it is possible to export the constraints to libGDX? Or to trick the animations into keeping them when I export them?

Thanks!


Solution

  • I fixed it in the end by putting bones through all of the pistons, and then putting the constraints on the bones. It was a bit of a pain, but definitely works fine now.