MAnimal Controller

The animal script is responsible to control all the Movement logic of the animal. It manages all the Animator and the Rigid Body parameters, and all the States and Modes the animal can do.

Main Principles

The Animal Controller needs an Animator and a RigidBody to work. This two components need to be at the same hierarchy level than the Animal Script.

Animator Component

Since the we are using a a RigidBody component, the Update Mode is recommended to be set to Animate Physics.

Rigid Body

The RigidBody component allows the animal to interact with other rigid and static objects on the scene.

  • The rotations will be handled by the Animal component so we will freeze all the rotations on the RigidBody component.

For all creatures, Bipedal or Quadrupeds, is recommended to add Colliders on the main bones of the creatures, Like the Spine and the Head. Thereโ€™s no need to add a Capsule Collider to the Root GameObject.

Animator Controller

The Animator Controller is the core Animation Logic for the Animal script. It will communicate back and forward with the Animal script to inform which animations are playing and which State or Mode the is animal at.

For the Animal Controller to work properly, the Animation States are tagged with unique tags to find and check if the active playing animations match with the ones commanded by the Animal component.

Tags like (Locomotion, Jump, Attack, Recover, Idle, Action).

That way the Controller checks if we are on the correct state and the correct state animation.

โ€‹

On the next pages you will find what all the Public Parameters on every Group does.