SkinnedMeshRenderer.SetBlendShapeWeight not working at all in Unity 3D

Viewed 10

I have a 3D character in my scene with a few BlendShapes to make him fatter/thinner as suchenter image description here:

..the higher the value, thinner the character...

Now when I use the following line to change the BlendShapes:

// public SkinnedMeshRenderer playerMesh; assigned in the editor
// blendShape is an enum, with value ranging from 0-2
playerMesh.SetBlendShapeWeight((int)blendShape, weight);

..it doesn't do anything. I've even checked if line is being called properly or not through the debugger, and it is.

Is this a bug or something, because I'm pretty sure the code is correct. Any ideas?

0 Answers
Related