Reading Bone Positions from Animation Without Moving Your Character
When I was building my VR project in Unity, I ran into an interesting problem. I had a character whose animation was controlled by a Timeline, and I needed to know where the ball in their hand would be at a specific moment in time — before the Timeline even started playing.
My first instinct was to use AnimationClip.SampleAnimation(). It works: you pass in the character’s root GameObject and a time, and Unity poses the entire skeleton at that frame. Then I could just read ball.position and I’d have my answer.
But there was a catch — SampleAnimation actually moves things. Every bone on the character gets repositioned. Since the ball was a child of the hand bone, it moved too. I had what I needed, but I’d physically displaced my character in the scene to get it.
My next thought was to save the transforms, sample, read, then restore. But that only saves the root. The child bones — the hand, the fingers, everything in between — all still hold their new poses. A full skeleton save/restore would mean iterating every Transform in the hierarchy, which felt expensive and fragile.
So I looked for a better way. Here’s what I found:
The cleanest runtime solution is a sampling clone. In Start(), I instantiate a hidden duplicate of the character — renderers disabled, HideFlags set so it doesn’t clutter the hierarchy. All my sampling calls go to the clone. The real character is never touched, and there’s no pose to restore.
There’s also AnimationUtility.GetCurveBindings() in the editor namespace, which lets you evaluate raw animation curves directly — no GameObject needed at all. But it’s editor-only, so it won’t survive a build.
In the end, for my specific case, neither was actually necessary. I’m doing all my sampling in Start(), before the Timeline begins playing. The Timeline immediately takes over and overwrites whatever pose I left the character in. The “side effect” simply doesn’t matter.
The lesson I took away: understand when the side effect occurs relative to when it matters. If you’re sampling at editor time or before gameplay starts, the simplest approach is fine. If you need to sample mid-gameplay without disturbing a live animation, invest in the clone pattern.

