On a general note: avoid using uppercase (and spaces etc.) in animation names. Also check https://github.com/libgdx/libgdx/wiki/3D-animations-and-skinning for more information about animations and https://github.com/libgdx/libgdx/wiki/Importing-Blender-models-in-LibGDX for information about using Blender models in LibGDX.
Convert the file to .g3dj using the -o G3DJ
command line option of fbx-conv
, e.g. fbx-conv -f -o G3DJ i1.fbx
(where -f
is used to flip texture coordinates). Make sure to update your code to use this G3DJ file instead of the previous G3DB file. Next open the resulting .g3dj file using a text editor (e.g. notepad or the text editor of your ide/eclipse). The file should be easily readable (see http://blog.xoppa.com/behind-the-3d-scenes-part1/ for more info on how to read it) and contain a section (json key) called animations
.
If there are no animations in the file, it should looks like "animations": []
at the bottom of the file. In that case make sure to check to export animations in blender. See also: https://github.com/libgdx/libgdx/wiki/Importing-Blender-models-in-LibGDX.
If there are animations in the file, they are included inside the array (between the "animations": [
and ]
). Note that animations can take up a lot of space, so the actual line "animations": [
might be located somewhere in the middle of the file. In that case make sure that the name (id
) of the animation exactly matches the string used to specify the animation.
If the animation is included in the file and the string matches, then enumerate all animations inside the model/modelinstance to ensure they are correctly loaded:
for (Animation anim : modelInstance.animations)
Gdx.app.log("Animation", anim.id);
If the animation is not included in the ModelInstance replace modelInstance
with model
in this snippet to make sure it is included in the model. If it also isn't included in the Model, make sure to refresh/clean your workspace.