|
Creature Control for Unity v0.1
|
A target rig or skeleton for a creature.
Public Member Functions | |
| virtual void | Pose () |
| Pose the target rig using the IK targets. | |
| void | MatchTo (Creature creature) |
| Align the target rig with a creature. | |
| virtual void | MatchTo (Creature creature, ref bool anythingChanged) |
| Align the target rig with a creature. | |
| virtual void | AlignPose () |
| Align the pose. | |
| void | AlignPair (Transform leftTransform, Transform rightTransform) |
| Align a pair of bones. | |
Static Public Member Functions | |
| static Quaternion | TargetToBoneRotation (Transform bone, Transform nextBone, Vector3 up) |
| Compute the rotation from the target to the creature's bone. | |
| static Quaternion | TargetToBoneRotation (Transform bone, Transform nextBone) |
| static Quaternion | TargetToBoneRotation (Transform bone, Vector3 forward, Vector3 up) |
| Compute the rotation from the target to the creature's bone. | |
Public Attributes | |
| HeadTarget | head |
| The target for the Head pose. | |
| TorsoTarget | torso |
| The target for the thorax pose. | |
Protected Member Functions | |
| virtual void | Awake () |
| Unity calls Awake when loading an instance of a script component. | |
Static Protected Member Functions | |
| static Transform | FindModel (Transform creatureTransform) |
| Find the creature 3D model in the hierarchy. | |
Protected Attributes | |
| Animator | animator |
| The animator for the creature. | |
|
virtual |
Pose the target rig using the IK targets.
Reimplemented in Creatures.Insects.Rig.
| void Creatures.Rig.MatchTo | ( | Creature | creature | ) |
Align the target rig with a creature.
| creature | The creature to align to |
|
virtual |
Align the target rig with a creature.
| creature | The creature to align to |
| anythingChanged | True when any property of the creature has changed |
Reimplemented in Creatures.Insects.Rig.
|
staticprotected |
Find the creature 3D model in the hierarchy.
| creatureTransform | The (root) transform of the creature |
|
static |
Compute the rotation from the target to the creature's bone.
| bone | The creature's bone for this target |
| nextBone | The next bone in the creature's hierarchy |
The next bone is used to compute the direction of the bone. The 'up'-direction of the bone is currently fixed to (world) up.
|
static |
Compute the rotation from the target to the creature's bone.
| bone | The creature's bone for this target |
| forward | The forward direction of the bone |
| up | The up direction of the bone |
|
virtual |
Align the pose.
This will
Reimplemented in Creatures.Insects.Rig.
| void Creatures.Rig.AlignPair | ( | Transform | leftTransform, |
| Transform | rightTransform ) |
Align a pair of bones.
| leftTransform | The transform of the left side bone |
| rightTransform | The transform of the right side bone |
This will
|
protected |
The animator for the creature.
This is optional