Search Unity

Update of SkinnedMesh after animation.Play

Discussion in 'Scripting' started by devel, Nov 17, 2009.

  1. devel

    devel

    Joined:
    Mar 11, 2009
    Posts:
    140
    Hi,

    I have a question about starting an animation on skinned meshes:

    After starting an animation on a skinned mesh (no cross fading, no blending) I pause the program by a Debug.LogError()-print. Now the bones are all in the right place, so are the meshes (not skinned) that are in the bones hierarchy. Though the skinned mesh is not as yet.

    Am I right that the skin is being updated in the second LateUpdate()-call after the animation request?

    Is it possible to trigger the skin to be updated right away? I need this because I need my camera to be syncrhonous with the mesh (change position, look at mesh). Now if i would have to use flags and shift all calls that depend on the updated skin to their LateUpdate()-method the code would not be well readable anymore, so i very much hope that there is a trick...

    Happy for any advice.
    Thanks.