The base class for all creatures.
Unity Properties
In order to control various parts of the creature, certain bones need to be identified in the Configuration section. Bones which are children of a bone listed in this section are detected automatically.
The child bones can be inspected by folding out the parent bone section
It is always possible to manually identify these bones or to override the automatically detected bones by editing the fields of the child bones.
Bones are identified by settings the parameters in the Configuration section to refer to bones in the armature or rig of the model.
- Note
- The configuration parameters should not point to the bones in the 'Target Rig' but to those in the model.
- Configuration
- Head (Creature.head) This shall point to the head bone transform
- Creature.animator
|
|
Transform | model |
| | The (hopefully rigged) 3D model of the creature.
|
|
Head | head |
| | The head of the creature.
|
|
Torso | torso |
| | The torso of the creature.
|
|
Tail | tail |
| | The abdomen of the insect.
|
| Rig | rig |
| | The target bones rig.
|
|
Vector3 | toCreatureTranslation |
| | The positional different between the target rig and model root.
|
|
Quaternion | toCreatureRotation |
| | The rotational difference between the target rig and the model root.
|
|
Animator | animator |
| | The animator of the creature.
|
|
Dictionary< string, Transform > | boneDictionary |
| | A dictrionary of all (possible bones) indexed by their names.
|
|
|
static readonly int | ForwardParameter = Animator.StringToHash("Forward") |
| | Animator parameter for forward/backward motion.
|
|
static readonly int | RightParameter = Animator.StringToHash("Right") |
| | Animator parameter for sideward motion.
|
|
static readonly int | RotateParameter = Animator.StringToHash("Rotation") |
| | Animator parameter for rotational motion.
|
|
static readonly int | SpeedParameter = Animator.StringToHash("ForwardSpeed") |
| | Animation parameter for forward/backward speed.
|
|
static readonly int | SideSpeedParameter = Animator.StringToHash("SidewardSpeed") |
| | Animation paramter for sideward speed.
|
|
static readonly int | BaseLayer = 0 |
| | The id of the animator base layer.
|
|
static readonly int | SidestepLayer = 1 |
| | The id of the sidestep layer of the animator.
|
|
static readonly int | SidestepWalk = Animator.StringToHash("Sidestep.Strafe") |
| | The id of the SideStep.Walk animation state.
|