New here. I wanted to know that how to get parent the mesh to armture bone to script. Reason is that I wanted the character to switch tools when equip type of weapon when assign to handle. Tried to look at the example on github not sure if I found it. I wanted to make sure the mesh took move with the animation later.
On update function :
- get bone position
- move object to bone position
- rotate object to bone rotation (use rotation offsets if the object rotations origin is not reset)
You can parent an empty object to armature bone in Blender, and afterwards parent your weapon to this empty object like usual.
I have added an example which should do what you are looking for. To run it properly use the armory updater first. Press
X key to equip axe or sword.
Let me know if that works!
Oh example help out. Tested. Does it position to head or tail? Got off position. At least got where to general area to code or blender model setup.
You got off position in the
animation_bonechild example? Did you update armory like mentioned? Or are you talking about a different blend?
Oh I see. It hard to tell if the update is done. It should say sdk update. Since there are done text logs.
The Update SDK recommends to then relaunch Blender to use the new SDK. That may have caused your trouble.