Tutorial 2 - Animation in Unity


Do you think that God stays in heaven because he too lives in fear of what he has created?  

- Spy Kids 2

This week I imported my cool farmer guy into Unity. The animations came along for the ride, and all in all was a rather painless experience.

The Farmer - Crucified for their sins

And so now my chickens have a farmer to keep them in check :)

I used the simple character controller script to give my farmer movement. The animation is controlled by tracking the difference in position from the last frame to the current one, updating a speed variable along the way. The speed does affect the walking animation speed, but is barely noticeable to be honest, a running animation would be perfect here to differentiate.

Regardless, now The Farmer can walk among his peers.   

(He chooses to Tpose in between walks to assert dominance)

While it's not clear what His responsibilities are on the farm, he does enjoy kicking the chickens around.

(For those interested in the script, we find the difference between the chicken position and the farmer, normalize it to get the direction, then we can apply force to the chicken in that direction.)

Unfortunately, this abuse would not go unpunished. A story for next time.  

Thanks for reading :)

Leave a comment

Log in with itch.io to leave a comment.