niu-gdo / IGDO-Fall-2023-Project

IGDO's Fall 2023 game project.
7 stars 0 forks source link

Set Up Basic Character Visuals #36

Open ExplosiveEggshells opened 10 months ago

ExplosiveEggshells commented 10 months ago

Brief

With access to some nice player character art, we can replace our old capsule character visuals with something a much more exciting.

With this issue, we will integrate in our player character assets to visually represent our character and set up some basic animation to give it some life.

Detail

Building the Character

Fortunately for us, our character artist separated all of the character's limbs into separate files. This is a huge advantage since it will allow us to independently animate our character's limbs in-engine to produce a variety of motions.

To represent our character, we should create a new empty child on the Player GameObject and import each limb as a separate piece in a default pose (with the Torso acting as the root of all the other limbs).

Animation

Once the artwork is imported, we can use Unity's Animation designer to create a couple of animations for the character. Specifically, we'll want the following to start off with:

The falling animation will player if the player is airborne. Otherwise, if they are moving, they will play the walking animation. Otherwise, they will just idle. Default will be a debug animation.

It's worth noting that you do not need to create an animation for walking in both directions.

Character Animation Script

A new script will be needed to drive our animations. It will need to read the Character Controller (See #35) for horizontal input and grounding status to decide what animation to play.

Tasks

Related Issues

35 - Hard Prerequisite. We will need to clean up the Character Controller class before making a character animation script.