Parent to an Object that's parented to a Bone

In a previous post i asked how to parent to a bone during runtime. The solution i came up with was to parent objects (= BoneObjects) to each bone and then parent my object (= ParentObject) to the BoneObjects - the ParentObject would be parented to the bone.

But i cant get it to work:
The ParentObject thats parented to a BoneObject flies up and down where it shouldnt be. (Problem happens both if the Armature plays an action and if it doesnt play an action but moves)



If i parent the ParentObject directly to the Bone before starting the game, it works fine, but i need to parent during runtime…


(btw that thing in the top left corner is an arm)

try setting the localPosition of the object after parent to [0.0, 0.0, 0.0] this will ensure that it is at the right spot.

#edit
also hit alt+G, alt+R and alt+S to clear transforms.
scale items in edit mode(tab) not in object mode.

ahh ok it was the scale thing. thanks! :smiley: