There's more...

You don't have to create Animation Clips for Blend Shapes. Instead, you can manipulate them directly from code. Use the SetBlendShapeWeight() function on the Skinned Mesh Renderer component. You will need to know the index of the Blend Shape in the Blend Shapes array (you can check it in the Inspector, in the Skinned Mesh Renderer component of the character). We've prepared a small script that sets the weight. It is attached to the DirectBlendShapes game object. You can also find it in the Scripts directory of this recipe.

Creating animations for Blend Shapes gives more flexibility. You can also animate the Blend Shapes' weight with the Animation View. This way you can create dialog animations and believable animated facial expressions.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.148.102.166