I’m thinking about creating a game using JMonkeyEngine. I am studying the functions that it has but I always encounter a problem and I have already searched the web but I did not find an answer. I’m studying “Hello Animation” and created (in Blender) a model (a simple character) and made a simple animation. Using the script to export to the ogre format (I believe it is the most recompenseable format), all files except * .skeleton.xml (file containing the animations) are exported.
Information:
I’m using blender version 2.78.
I’m using the script that sdk itself gives me.
Ps: Sorry for any mistake … I do not speak English 100% and I do not want to take the risk of saying something that makes other sense.
I know a sdk can convert directly from extension * .blender to * .j3o. However, even using this method (sorry, it was to have said before) the line: “AnimControl cont = model.getControl ();”, the value cont becomes null. I’m using NemesisMate’s advice.
I made a simple animation of a rolling monkey. When I exported to ogre, it gave this problem. I do not know if turning straight from .blender format to .j3o will work.
The remainder is the default procedure, creates AnimChannel, and so on.
Now when I run the animation, the camera moves down, and it stops. (I know the animation is running because I put it to show a message when the animation closes.
I’m not sure what is supposed to do but the anims are clearly not working. You are using the 3.0 version so first of all I suggest you to try the 3.1 (the importer has many updates).
Another suggestion is, before trying them in the scene try the animations first in the “scene composer”. When you add the model to the model folder and <right click> -> convert to j3o Binary", the j3o is generated in the same folder. <Double click> that j3o or <right click> -> edit in SceneComposer. The “scene explorer” should be opened too (down left, normally).
Open the tree untill you arrive to the AnimControl, open it too.
Now, <double click> or <right click> -> play on the desired animation. If it works, go on with the code, if not, check what is missing in blender to have it detected by the importer.
PD: In 3.1 the model is doing a movement (but I don’t know if it is a good one)