setParent() problem with animating children

So I have gotten to the point where my inventory is nearly 100% working…consumables, pick up’s, equiping items and removing them…they are created in the game world as well at this point…as well as removed…so aside from some polish it is working 100%(not selling or deleting, but methods are being worked on.)

My issue is I am having trouble trying to figure out how to get animations for the created equipment working...they are pre-animated using the same rig as the player...same vertex groups exist etc...
If I parent them to the root bone it does not animate...just follows the player. Does anyone have an idea how to get this working, or do I need to parent to the specific armature that controlls the object...in this case a sword?

bottom line I cannot get the object to animate with the parent sharing the same skeleton and vertex groups.

any thoughts would be welcome and if anyone has any insight, examples, or notes I would be grateful.

My issue is I am having trouble trying to figure out how to get animations for the created equipment working…they are pre-animated using the same rig as the player…same vertex groups exist etc…

So far as I know, vertex group information is lost when converted from blender data into BGE data. As such, this approach has little chance of success.

If you don’t need deformation, parent to a specific object parented to a bone at the desired location (ie an empty in the guys fist to hold the sword).
If you need the deformation, there are a few solutions I can see:

  1. Have a rig per item and synchronise them
  2. Have everything attached to the guy and toggle visibility
  3. Have everything attached to the guy at spawn and delete everything. Every time he changes what is equipped, delete him and add a new one.

Yeah, I guess I have to just parent it, and match the animations…probably just reading the players animation…all the equipment uses the same skeleton…I will have to simplify it.

OTOH toggling visibility would be simpler, but I have already based so much code around the way I was using the inventory back and forth between scenes…thanks for passing this info on…I will have a stab at it, knowing I need another approach.

I have it working, but it has some odd behavior I have to work out…only playing the first frame of each state for instance…

I was wondering if it was possible to set a specific bone as a parent? …that is a bone that already exists in the skeleton?

OK, nvm…I was making this way harder than it is…after trying most of those methods…the last I tried was the easiest…parenting an empty…then setParent to the empty…

Thanks again sdfgeoff to the rescue.