Tutorial 2


This is the devlog of Tutorial 2 for my portfolio.

I imported my model along with the animations and checked if the animations were working. All animations were working fine. I set each animation up to play at set conditions. 

Idle - plays when the player is not moving.

Wave - plays when the button (spacebar) is pressed. Also made it to stop playing when the button is pressed again. 

Walking - plays when the character is moving. 

The focus of this exercise was to make our character able to walk with the walking animation playing.  I coded the model so it was able to move forward or back with W/S keys and rotate the model using A/S keys. I used an animator controller in Unity, which allows me to control the animation. I then linked the animator to my code so that when the W,A,S, or D buttons on the keyboard are pressed, it will play the animation until it's no longer pressed, playing an idle animation.

Here's the gif of the walking animation:


I didn't have too much trouble in this tutorial.  I did make some changes to the code so it would do things more smoothly. The only pain I have with this task is sometimes unity would take a long time to load just to compile a script but I am using a macbook so I can't argue. 

Leave a comment

Log in with itch.io to leave a comment.