The Cycle - Devlog 03

We'll start off this devlog with a goal.

Goal: Rig the player character with a basic idle animation & implement a third person controller script

Character rigging

The idle setup was super easy, since I don't have any movement in the game yet, I haven't added any walking animations just yet. I followed the tutorial provided by Synty Store to upload a rig to Mixamo, choose my animation and finally export. From there, I was able to import the animation into Unity, make a small amount of tweaks, setup the Animation Controller and BAM, it was working. Got to love it when stuff just works.

From here, I am going to implement the third person controller so I can at least move the character around and then transition those animations as needed.

I like to move it move it

Because I don't really know what I am doing, I did what every developer would do, look up a Brackeys tutorial. This one was about Third person movement. Luckily it was using Cinemachine for the camera setup, which is something I was hoping on using for the game. This tutorial gave we a really good base for the character controller. My next steps will be to hook up the walking animation, then tweak some of the variables and camera settings to make it feel the way I am invisioning.

And back to rigging

Now that I had some movement I decided to go back to Mixamo and find a walking animation, imported that and made the required tweaks. I then decided to set up a Blend Tree in my Animator controller to blend between idle and walking. Currently I don't have any animations for turning or slowing down, but this blend tree is perfect for when I decide to finally add that in. Once thing I did have to do is set a Animator parameter from my controller script to enable the blend trees to work properly. Quite simple to be honest;

animator.SetFloat(AnimatorParamX, vertical);
animator.SetFloat(AnimatorParamY, horizontal);

In this case AnimatorParamX and AnimatorParamY is a class property to avoid magic strings (in case I need to update it later, makes it easy to find). vertical and horizontal is my Input.GetAxis values.

The animation is a bit odd without those transitional animations mentioned before, but for this early in development it will do while I sort out the other gameplay mechanics. Movement won't be that integral, interaction, story and puzzles will be.

The last thing I did for this session was setup the project on Github and pushed all the code... Should have done this day one but its all good, nothing has been lost.