- Home /
Question by
molki11 · Sep 22, 2013 at 07:45 PM ·
animation editoranother script
Is it possible to move bones which are controlled by an animator
Lets say i've animated an eyebrow. It has an angry and a happy animation ant it works great with mechanim. Now I want to move the eyebrow in its current state up or down, with a script like that:
public class FacialExpression : MonoBehaviour {
public GameObject eyebrow;
static float moveUp = 10.0f;
void Update () {
eyebrow.transform.localPosition.y += moveUp;
}
}
It doesn't seem to work. Is there another possibility?
Comment
Answer by Paparakas · Sep 22, 2013 at 08:09 PM
Try using transform.Translate instead. eg. transform.Translate(Vector3.up * moveUp);