Animate a human model from xyz data

I have xyz data of a person’s joints as he is squatting down. Is it possible to animate a model based on the xyz data on Unity with a script. If so, what are some methods should I look out for to get started? My goal is to have a script that would load different xyz data, and make a crude animation from it.

What you’re looking for is called motion capture (if you have all the joints) or inverse kinematics (if you only have the endpoint, e.g. the hands). Unity does have IK builtin for humanoid animations, but motion capture will involve rolling your own system (or there might be one on the Asset Store). It’ll involve a lot of Quaternion.LookRotation’s from one point to the next one down the hierarchy, if that helps.

IK would be able to make the model “animate” based on the data I provide, but not make an animation right? Making the animation itself would be what the motion capture software is for?

Do you mean you need to store the animation you’ve read in as an AnimationClip?

If so, you should be advised that creating an animation controller is not possible in runtime code, so it would now become relevant to ask if this is for an editor script or an ingame script.

My goal is to run an editor script that would read off the xyz data, and then animate the model at runtime based on the data.