Building Character while Character Building!

Ryan Yamura
4 min readNov 29, 2020

Happy Day 35, and I hope everyone had a very happy and healthy thanksgiving and a fun day shopping!

Today’s blog is going to be about what most of today’s work entailed: Character building and Animations!

That’s right, I know it may sound mundane, and you may be thinking: Haven’t we done this before?

Well yes! And no.

As Jonathan points out in his lessons, you’re going to have to build characters and character controllers over and over, its repetition, and the more you do it, the better you get at it! It well… builds character 😏.

So of course, I started off today by building a simple character controller for my player, and then attaching it to a capsule (a 3D object placeholder) for my player.

After building a character controller and attaching it to Capsule Player!

After writing the character controller script and attaching it to the object, I came across my first challenge:

It didn’t work.

Why? Well, that took some diagnosing. As far as I could tell everything was correct! So, why wasn’t it working? I ended up watching the challenge review video and sure enough the problem was pointed out to me, something I’ve not come across yet but makes perfect sense.

Womp womp.

The game is in 2.5D now meaning that there is a Z axis to take note of. This project happened to have the forward motion on the Z axis. A little adjusting later and my controller was working! Just had to change my GetAxis input to the Z axis!

Next, we applied a character model to the capsule player!

I think he wants some…T. PRAISE THE SUN!

A quick search on Filebase, and I found a suitable model for my player! Now, came the fun and soon to be frustrating part animating the character.

FUN?

  • I learned about a new resource that’s FREEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE!!!! Mixamo!
This is good. Very good.

Mixamo is a site that’s run by adobe that has characters and character animations for FREEEEEEEEEEEEEEEEEE!

I learned that you do need to set up a rig in order to take advantage of your own character models with these animations, but the models from filebase are set up so you can totally use these!

Now the frustrating part: Getting it all to work together!

Flow chart, eat your heart out!

After HOURS (well it felt like hours) of choosing and setting up all the animations so they worked with the model, I had to create logic for when these things would animate.

Parameters help!

This was mostly accomplished using parameters to control when these animations would play. Including a new type of parameter I’ve not used yet for animations, which is a float value.

Basically, I could set it up so that my character would run when a “Speed” float value was over a certain amount! Which is this case would be a very low amount of 0.1f because anytime my character is moving, we would want the character to “run”. This same type of logic could be used for when jumping and such.

This was before the Run animation float was created.

There is so much potential, as you can see from the animator component, I ended up picking up more than just 2 types of animations to play with! I’m hoping to be able to work out how to get all of these animations to successfully flow through to each other when called on correctly, as it’s currently giving me a little grief due to the parameters being set by the code, so I’m going to have to work on the logic on when to update these values.

All in all, a fun productive day! I’m looking forward to the weekend, and getting back into it on Monday.

Thanks again for joining me, I’ll catch ya soon!

— Ryan

Builder of Characters

--

--