Animations

Ok, so I followed every tutorial out there and understand how to make animations and the requirments for jme3.(Blender) I have an object with a single bone in it that is linked to the main bone at 0,0,0 the origin. I create my animation with the single bone attached to the object and save the frames, putting the animation on the NLA editor on the same line, and they run perfectly fine. However, when I export it as a OGRE into jme3, there is an issue. The model itself loads fine and I am given the animations with their correct name under Animcontrol, but when I play it, nothing happens and the object does not move. If someone could help me out and explain what I am doing wrong I’d really appreciate it!

Could we see your code?

@sgold , actually I am doing this in the scene composer window, so I can test the animations before I write code to run them.

How about sharing the blend file, then?

@sgold sounds like a good idea. It should be attached to this comment. Dropbox - GunAnimTest.blend - Simplify your life

Are you aware that your model has two armatures?

What I did was add a bone which I set at the origin and added another bone which was parented to the root. This is the way I have seen people do it on YouTube tutorials but I probably missed something. @sgold what is the right way to construct this?

Somehow instead of adding a child bone to your root bone, you added a child armature to your first armature, so now instead of one armature with two bones, you have two armatures (named Armature and Armature.001) with one bone each. You can see this by expanding the Outliner area.

In suggest you delete the parent Armature and a child bone to Armature.001. The easiest way to add a bone is to select the parent bone (named “Bone” in your case) and extrude by pressing the “E” key.

I hope that helps.

1 Like

@sgold if I extrude from the root bone then it is permanently attached to the root bone and can only rotate without moving the root bone, and I’m not sure whether it will work if I move the origin bone. Is there a way to add a separate bone, yet still part if the same armature?

yes you can, click the bone, and then Alt + P, “Disconnect Bone” or something like that.

@sgold said: The easiest way to add a bone is to select the parent bone (named “Bone” in your case) and extrude by pressing the “E” key.

I would suggest making the bone longer, and the subdividing it (W). That way the bones are all orientated the same

Armatures for JME3 should have exactly one root bone. All other bones in the armature should be attached (directly or indirectly) to the root.

Please re-read this section of the wiki

Dropbox - GunAnimTest2.blend - Simplify your life This is the new file where I used only one armature and tried to get everything correct, but still nothing in jme3. Is there something else I’m missing too?

I final got the animations to play! thanks guys!