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
|
| virtual Quaternion | GetStdOrientation () |
| | Get the standard orientation of the model.
|
| Bone.Pair[] | FindSymmetricBonePairs (Transform[] bones) |
| | Find all (left/right) bone pairs in the children.
|
| string | FindLeftBone (string rightBoneName) |
| | For a given right bone name, find the corresponding left bone name.
|
| string | FindRightBone (string leftBoneName) |
| | For a give left bone name, find the corresponding right bone name.
|
| string | FindOtherBone (string boneName,(string thisSideName, string otherSideName, bool tokenOnly)[] mapping) |
| | For a give bone name, try to find the corresponding bone name at the other side of the body.
|
| bool | CheckTargetRig (string targetRigResourceName) |
| | Ensure a target rig is available.
|
| virtual bool | CheckTargetRig () |
| | Ensure a target rig is available.
|
| bool | CheckModel () |
| | Ensure that the creature rig is available.
|
|
virtual void | Update () |
| | Update the creature.
|
|
void | UpdatePose () |
| | Update the pose of the creature using the target rig.
|
| virtual void | UpdateModel () |
| | Update the bones of the creature's rig from the target rig pose.
|
|
|
Transform | model |
| | The (hopefully rigged) 3D model of the creature.
|
|
Head | head |
| | The head of the creature.
|
|
Torso | torso |
| | The torso of the creature.
|
| Rig | rig |
| | The target bones rig.
|
|
Vector3 | fromTargetTranslation |
| | The positional different between the target rig and model root.
|
|
Quaternion | fromTargetRotation |
| | The rotational difference between the target rig and the model root.
|
|
Animator | animator |
| | The animator of the creature.
|
|
Dictionary< string, Transform > | boneDict |
| | A dictrionary of all (possible bones) indexed by their names.
|