Search Unity

Question How can I sample an animation rigging frame in editor/game?

Discussion in 'Animation Rigging' started by Ratslayer, Jun 12, 2021.

  1. Ratslayer

    Ratslayer

    Joined:
    Feb 6, 2014
    Posts:
    37
    I have a rigged character that is animated with an AnimationClip. I want to be able to sample specific frames from this clip and apply them to the model. I want to use that to create static characters, like dead bodies and statues.

    I can sample the clip by writing "clip.SampleAnimation(modelGameObject, sampleTime)", but it only samples the rig values, it does not actually apply the rig to the model. How can I apply the rig constraints after sampling the clip?
     
  2. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295