Making a Legacy-based Character

Adventure Creator's implementation of Unity's Legacy animation system is such that it automates as much of the work for you as possible, while still making it easy to build complex, layered animation systems. The two characters in the 3D demo, Tin Pot and Brain, both rely on Legacy animation.

Regardless of whether you are making a Player or NPC, begin by dragging your character model into an empty scene.

Provided that your character model Animation Type has been set to Legacy, you should see that the GameObject features an Animation component. If not, go to your models' Import Settings and set up the Rig settings as follows:

Adventure Creator will drive the character's Animation component automatically, so the default clips can be removed. In the character's Animation Inspector, set the Size to zero, clear the default Animation field, and uncheck the Play Automatically checkbox.

Now we'll add the necessary components to our character, and then tell Adventure Creator how it can control our defined Parameters. Add the following components to the model:

  • Capsule Collider
  • Rigidbody
  • Player / NPC script (either one)
  • Paths script
  • Audio Source (optional)

The Capsule Collider should be adjusted such that it's bottom touches the floor.

Then check all three boxes in the Rigidbody's "Freeze Rotation" field.

At the top of the Player or NPC Inspector, set the Animation engine to Legacy. The rest of the Inspector will change to reflect this.

Just beneath the Animation engine field is the Standard 3D animations panel. Here we define the "standard" animation clips that will be played automatically based on the character's state. Fields that are left blank will not be used, but at the very least a character should have Idle and Walk clips assigned.

You have two options when it comes to playing "Talk" animations - Standard and Custom Face. With Standard, the character will play the same set talk animation for every line of speech (though you can change standard animations in-game with the Character: Animate Action. With Custom Face, you can define a custom head and mouth animation with each line of dialogue, in the Inspector of the Dialogue: Play speech Action.

The next panel is Bone transforms. When using the Character: Animate Action, you may want to layer multiple clips on top of each other to create more complex animations. You can do this in Legacy mode by isolating clips to play on a specific part of the body, but you must first define the bones that represent the "start" of each body part.

For example, the Left arm bone transform might be represented by the character's left shoulder bone. To access a bone so that you can drag it into a Transform field, expand your character's GameObject until you find it. Here, Tin Pot's Arm_R bone has been selected.

The character is now ready to be placed in our Adventure Creator game! Finish up by turning them into a prefab. If you are making a Player character, be sure to place the prefab in a Resources folder, tag it as Player, put it on the Ignore Raycast layer, and assign it in the Settings Manager.

Adventure Creator and this website are copyright Chris Burton, ICEBOX Studios

Go to top
Do NOT follow this link or you will be banned from the site!