# What is a good metric to compare poses of a gltf skeleton

I have an initial pose “A” (defined by the position, rotation, scale of the bones of the gltf skeleton) and a list of possible poses [p1, p2, … pn]. I want to find the pose p_i that is “closest” to pose A.

My first idea was to find the pose p_i that minimizes the distance between the bones, but is there a better way?

Comparing the distances between bones sounds indeed like a good start.

Sorry, to reopen this question. But I am getting unexpected results and was wondering if I am misunderstanding something.

I am trying to compare poses of a 3D skeleton, because I want to interpolate between the two poses A and B i.e. for each bone I interpolate between A and B. But to get a good result I adjust the interpolation speed (called “alpha” in the docs) based on the distance of A to B. The greater the distance the slower I want to interpolate.

But after computing the distances between the bones all my distances are very small i.e order e-8. Is this because I am computing distance in the local coordinate system of the bone or the units of distance somehow being wrong?

For somebody to answer this question, you need to provide your model (as simple as possible) to replicate the issue and the code you use to calculate the distance, preferably live, i.e. codepen or jsfiddle.

Sorry, I can’t provide the model here. I guess I can just ask a more general question. I am using the .distanceTo() method to calculate the distance between the bones: For each bone I get let pA = bone.position (bone position in pose A) and let pB = bone.position (bone position in pose B). Then I calculate pA.distanceTo(pB). Is this the correct way to calculate the distance between bones? Or do I have to take rotation and scale into account somehow