Grab problem

Okay i have a Player and NPC.

I want my Player to grab the NPC, i have set this up as when my Player gets close
to the NPC and i press E my Player wiill take over the Npc movements and NPC is now grabbed.

While this is happening a ACTION actuator will play the GRAB animation. HERE IS MY PROBLEM

The animation does not always match up, the player arm goes through Throat of NPC or through
his chest etc. How can i make this perfect where both Player and NPC animations sync up and
align both armatures in right position.

import bge


cont = bge.logic.getCurrentController()
scene = bge.logic.getCurrentScene()
own = cont.owner


own.worldPosition = scene.objects["head jack"].worldPosition

Use this script with ik constraints.They do work in the blender game.

Thank, but what IK con ?

This is the ik bone constraint.



Then use the run armarture constraint.
~

Attachments


Ahh i see. Im talking about the entire body of the NPC, that is connected to its own playerbox.
Sorry if confusing.

Perhaps using a cutscene approach? So use an edit object actuator to align the player armature to the enemy and then use the worldPosition of the enemy (-2 or something on the y axis), and set the worldPosition of the player.

EDIT: you may have to use localPosition instead.