I have a root gameobject that has a rig with one bone. I want the player to be able to add limbs so I need to add bones at runtime and set their position depending where the player places them
What is your question exactly / where are you encountering problems? your use case may also be helpful.
You’ll be adding gameobjects whose position is connected to the various vertices by some magnitude. For example. Bone attach, associates with various vertice points. But it associates by 0-1.0 ---- 0 - 100% weight. If the bone object moved position, the weight of that movement is applied to the vert.
You’ll need a list of verts, Known verts you want to interact with. Add the bone gameobject transform and use the transform positions original position and its current position to calculate how those verts should move.
Vert A should have moved 20% of 100% of the distance. for example.
You can use a distance or magnitude check from gameobjects position to grab nearby verts, and reduce their weight by the distance.