Creature Control for Unity v0.1
Loading...
Searching...
No Matches
Creatures.Rig Class Reference

Description

A target rig or skeleton for a creature.

Inheritance diagram for Creatures.Rig:
Creatures.Insects.Rig

Public Types

enum  WalkerType { Sole , Toe }
 The type of walker. More...

Public Member Functions

virtual void AlignPose ()
 Align the pose.
void AlignPair (Transform leftTransform, Transform rightTransform)
 Align a pair of bones.
virtual void PoseTargets ()
 Pose the target rig using the IK targets.

Static Public Member Functions

static Transform FindModel (Transform creatureTransform)
 Find the creature 3D model in the hierarchy.
static Quaternion old_TargetToBoneRotation (Transform bone, Transform target)
 Compute the rotation from the target to the creature's bone.
static Quaternion TargetToBoneRotation (Transform target, Transform bone)
 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.
TailTarget tail
WalkerType walkertype = WalkerType.Sole
 The type of walker.

Protected Member Functions

virtual void Awake ()
 Unity calls Awake when loading an instance of a script component.

Protected Attributes

Animator animator
 The animator for the creature.

Properties

virtual float length [get]
 The length of the creature.

Member Enumeration Documentation

◆ WalkerType

The type of walker.

Enumerator
Sole 

The creature walks on its soles.

Toe 

The creature walks on its toes.

Member Function Documentation

◆ FindModel()

Transform Creatures.Rig.FindModel ( Transform creatureTransform)
static

Find the creature 3D model in the hierarchy.

Parameters
creatureTransformThe (root) transform of the creature
Returns
The transform with the model or null if it could not be found

◆ old_TargetToBoneRotation()

Quaternion Creatures.Rig.old_TargetToBoneRotation ( Transform bone,
Transform target )
static

Compute the rotation from the target to the creature's bone.

Parameters
boneThe creature's bone
targetThe target for this bone
Returns
The rotation from the target bone rotation to the creature bone rotation

◆ TargetToBoneRotation()

Quaternion Creatures.Rig.TargetToBoneRotation ( Transform target,
Transform bone )
static

Compute the rotation from the target to the creature's bone.

Parameters
targetThe target for this bone
boneThe creature's bone
Returns
The rotation from the target bone rotation to the creature bone rotation

◆ AlignPose()

virtual void Creatures.Rig.AlignPose ( )
virtual

Align the pose.

This will

  • Put the leg ik targets on the floor
  • Put ik targets for each left/right pair in the same forward position
  • Put ik targets for each left/right pair symmetric in the sideward direciton

Reimplemented in Creatures.Insects.Rig.

◆ AlignPair()

void Creatures.Rig.AlignPair ( Transform leftTransform,
Transform rightTransform )

Align a pair of bones.

Parameters
leftTransformThe transform of the left side bone
rightTransformThe transform of the right side bone

This will

  • Put the transforms at the same height
  • Put the transforms in the same forward position
  • Put the transforms symmetric in the sideward direciton relative to the rig.

◆ PoseTargets()

virtual void Creatures.Rig.PoseTargets ( )
virtual

Pose the target rig using the IK targets.

Reimplemented in Creatures.Insects.Rig.

Member Data Documentation

◆ tail

TailTarget Creatures.Rig.tail

The target for the tail pose

◆ animator

Animator Creatures.Rig.animator
protected

The animator for the creature.

This is optional


The documentation for this class was generated from the following file: