Bone animation in game engine

I have created a bug creature and fully rigged and weight painted it. I have also inserted keyframes into the action editor in order to animate it. When I scroll through the frames in the action editor or even the ipo editor the bones move and the mesh moves correctly along with it.

However the animation simply will not play in the game engine. I followed this tutorial:

to make sure I was doing things right and it seams I was. So far I just tried setting an always sensor on the armature, connected that to a controller and that to an action actuator which has the frames of the creatures walking animation set in the “from” and “to” fields. I also made sure to type the name of the action into the “action” field. When I hit “P” the character doesn’t move an inch. I tried using different variations of sensors to see if maybe I had dones something wrong in the game logic. Nothing works. As far as I can tell the character should be animating but the animations only work if I play them in the timeline or scroll through the ipo or action editors.

Did I skip some step that allows armature animations to be applied to objects in the game engine or something like that? Why is this not working?

If this isn’t enough information I can try to upload the blend file but it might be too big.

Any ideas what I might have done wrong?

Well, I figured out part of it - for some reason I have to parent the mesh to the armature (evne though it was already parented?). When I do this the creature moves in the game engine.

Unfortunately reparenting also causes the mesh to move to a slightly different location and deform. No amount of moving it around or trying to line it back up with the armature seems to do any good.

Why do I have to choose between no animation at all or screwy animation?

Alright. . . so I manually scaled/moved/rotated my mesh back into lpace perfectloy over the armature, reset all the rotation/scale/transform/what have you, then parented the mesh to the armature. It “works” now but for some reason the animations are exaggerated (for instance lets say a bone moves one unit to the right - the vertices it is attatched to will move like 1.5-2 units to the right. I could overlook this, but there’s another problem - even though I cleared the rotation of the armature its axes seem screwed up too. if I set the creature to track to the player what should be the X axis points towards the player instead of the Y. Normally I can fix these kind of problems by clearing rotation but when I clear rotation on this armature then try the game engine again the creature justk inda goes nuts, jumping around really really fast and randomly for a split second before disappearing to god knows where.

What is the deal? I’ve never seen blender screw things up like this before - but this is also the first time I’ve tried to use armatures in the game engine. Why don’t armatures seem to work like normal objects when it comes to game logic and physics? The tutorials I’ve seen suggest that they should. But in this case it just isn’t working. Is this a bug in blender? Did I just screw some little hard to see thing up along the way that is causing these problems now? Can I fix it? Please Please Please tell me I won’t have to start over from scratch and create a new armature and mesh then animate again. I think I’ll just toss my computer out the window if it comes to that.

I think the problem is with the armature modifier. The game engine will only make use of the modifier if you use ctrl+p to parent the object to the armature. If you look in the modifiers panel you will see the armature modifier and the button “Make real”. Do not press this button to use the armature in the game engine.

If you do this and you still have the problem then maybe someone else could help, but first get rid of all armature modifiers in the modifier panel and the recreate the modifier using ctrl+p then select “parent to armature”.

The armature affecting the model with twice the strength is usually a result of having more than one armature modifier.

Hope this helps.


A (very) simple .blend that demonstrates the correct modifier and logic:

ArmatureDeform.blend (34.5 KB)