0

I am trying to access the bone structure of my snake in unity2d and move the head by using this code. But it keeps throwing this error. I have applied Inverse Kinematics 2D CCD solver to rig the snake. I am hoping if I add velocity to the head the rest of the body will follow suite.

public class SnakeBehavior : MonoBehaviour
{
    void Start()
    {
        Head = transform.Find("bone_23");
    }

    // Update is called once per frame
    void Update()
    {
        Head.localPosition = new Vector2 (1f, 1f);
    }
}

derHugo
  • 83,094
  • 9
  • 75
  • 115

0 Answers0