How to make a eyelid-system in BGE? Knowing the limitation of the animation system in BGE, I would like to make a eyelid-system for a character. I made a system that works in Blender, but it has a constraint influence driven by a bone, something that doesn't work in Game Engine.

You can download the test file here: http://www.pasteall.org/blend/41543

When eye.anim is animated (by being rotated), the eyelid.deform is influenced (with a Action constraint) to be raised or lowered, to have a natural movement. But, when I close completly the eyelid by animating eyelid.anim, eyelid.deform mustn't be influenced by eye.anim.

Again, the system that is in the file does work in Blender, but not in Game Engine. This is because it uses a constraint influence driven by a bone. And something like this doesn't work in BGE (*). The only way to change an influence is by Python... but I won't do this only for the eyelids.

(*) I reported this some years ago (and, by mistake, again some hours agou), but it is not a bug but a known limitation of the game animation system.
@Monster comment made me remember that I used to use shape keys in eyelid movement. Now, I'm using bone deformation (because of someone suggest). To make any eyelid-system, I need to drive the influence of "something".


Using Bone Deformation: I have to drive some constraint influence.
Using Shape Keys: I have to drive shape keys value.


In BGE we can't drive constraint influence, but we can do it with Shape Keys values. So, the second method is the suitable one for me (at this moment).

I make a new file, with a Shape Keys based Eyelid-Movement here: http://pasteall.org/blend/41589


It respects the eye (bone) rotation (to raise and lower the eyelid.2 automatically).
When I close the eyelid (with eyelid.1 bone), eyelid.2 stands still.



How the system works:


eyelid.1 is the bone to animate.
eyelid.2 copies eyelid.1 location (using Offset) and it has an Action constraint, to move itself when the eye is moving.
The mesh has a shape key eyelid.down that is driven with Minimum Value by two variables using eyelid.1 and eyelid.2, both with Transform Channel in Y Location at Local with its respective bones.
The shape key eyelid.up is driven by the same variables, but with Maximum Value and with the inverted curve.


... it's better to see the blend file.