Animator in Script

Once the Animator Component is setup, you can control the parameters via script.

The parameters can be set in the Animator controller. Anything in "Quotes" is what you wrote down as a variable there.

[SerializeField] private Animator anim;

Drag the GameObject in the scene view into the "Anim" field.

Getting the direction of the look is something I'm thinking about. One thing that doesn't throw an error is this:

Last updated