Animations different in game vs the view port

My problem has to do with how the animations of parented objects are displayed in the BGE. When the animation is played in the view port (via the timeline) it plays exactly as expected. All children deform along the same axis as the parent object.

In the game engine, when my parent object (the submarine body) turns, all children continue to deform along the global axis instead of the submarine body’s local axis. This causes some crazy deformations and generally looks awful.

I have the file attached, as well as a video that demonstrates what I mean.

Submarine.blend (1.27 MB)

You can join all those children with the submarine body, I suppose that will fix it. You can also make a simple rig to move these ‘children’ if you want.Submarine.blend (1.24 MB)
Edit: Now I see you have a mirror modifier on the body, apply it before you join the children to the body otherwise you get a messed up model like in my attachment.

Thanks! It looks like that will work for everything except the propeller. I still want it to rotate when the submarine moves forward or backward, but that might require rigging like you said. It is a shame the game engine cannot work as well as Blender animations…

I figured out a way to do it. It is similar to your rigging idea, but I used keyframes instead. I simply created a new animation specific to the propeller that was matched to the original stretch animation. I then set it as an “always” action brick in the logic editor. It isn’t as elegant as parenting, but at least it gives results consistent with blender animations.

I created an extremely simple example of the problem so it becomes more obvious. I’m pretty sure this is a bug, so I submitted a bug to Blender.org

Attachments

BGE Animation Bug.blend (472 KB)