Animating a 3d model from joint data

Using a VR headset, a webcam and pose estimation AI, I have a C# script that can get vector3 positions for 15 joints (what you’d expect, elbows, hands, knees chest etc.). I also have a fully rigged 3d model of a humanoid figure. What I would like to do now is use my pose estimation script with this 3d model to make some animations. From this I have two questions.

  1. How do I connect this rig with my script that has vector3 positions of joints?
  2. My script only works when the game is running in play mode, so how should I go about recording my animations?

I cannot help you with the specifics of rigging the mesh (in fact I have a somewhat similar problem myself)

However, I can suggest that in order to set up your rigs with your available information you need to create your own editor using the UnityEditor namespace.