Animation

I am running across something I don’t understand about animation. For example, I import a FBX file with animations. I have no issues running the animations.

The problem I am trying to figure out is when an animation plays the object doesn’t really move, I can understand that much. Unless you actually tell it to move. So if I have a model waving above its head as an animation I am learning that the transform.position of the model really isn’t moving.

This presents a problem for what I am trying to do. I was expecting to see model’s hand position change when I read transform.position but that isn’t the case. It always stays at the objects rest position.

Is there any easy way around this? Do I actually have to animate the object in the same manner as the animation in order to have my model’s hand update its position?

I must be misunderstanding how animation vs model object is working in unity. Ultimately I would like to know the local coordinates of where the model’s hand is during the animation.

Any help or direction is helpful.

Thanks,

Here’s a work around:

  • create an empty game object

  • place it where the hand bone is and make it a child of the hand bone; orient it how you want, etc.

  • use that new empty game object’s transform to code the stuff you’re trying to do

Simple but effective work around.

slick50 - to get the position of the characters hand during an animation, you need the characters hand bone. If you check transform.position from within a script running on the base of the character, it will be the position of the character, which as you’ve pointed out, isn’t actually moving.

You could use i3DTutorials work around, or just find the hand bone directly and check its transform.position (which will update with world coordinates as the animation plays)