Search Unity

SampleAnimation animates only 1 sub-object

Discussion in 'Editor & General Support' started by BadFoolPrototype, Oct 21, 2019.

  1. BadFoolPrototype

    BadFoolPrototype

    Joined:
    Sep 7, 2013
    Posts:
    14
    Hello everyone,
    I am trying to figure out a simple problem.
    I am trying to create a tool to extract images from a 3D model to create spritesheets.
    Problem is that when using both:

    animationClip.SampleAnimation( animationObject, animationTime );

    or

    AnimationMode.BeginSampling();
    AnimationMode.SampleAnimationClip( animationObject, animationClip, animationTime );
    AnimationMode.EndSampling();

    it only animates 1 sub-object of the mesh!
    The mesh is composed by an orc with a club.
    Only the club is animated!
    If I preview the animation in a custom window, with the same methods, it works correcty.

    What possibly I am doing wrong ?
    Thank you!