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

Description

The target rig or skeleton for an insect.

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

Public Types

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

Public Member Functions

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

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

LegTarget leftFrontLeg
 The left front leg.
LegTarget leftMiddleLeg
 The left middle leg.
LegTarget leftBackLeg
 The left hind leg.
LegTarget rightFrontLeg
 The right front leg.
LegTarget rightMiddleLeg
 The right middle leg.
LegTarget rightBackLeg
 The right hindLeg.
float soleThickness = 0
 The distance from the toe bone to the ground.
Transform leftIkTarget
 The target Transform for the left (middle) foot for inverse kinamatics calculations.
Transform rightIkTarget
 The target Transfrom for the right (middle) foot for investe kinematics calculations.
TorsoTarget torso
 The target for the thorax pose.
TailTarget tail
WalkerType walkertype = WalkerType.Sole
 The type of walker.

Protected Member Functions

virtual void MatchIkOrigin ()
 Calculate and set the inverse kinematics targets.
virtual void Awake ()
 Unity calls Awake when loading an instance of a script component.

Protected Attributes

Animator animator
 The animator for the creature.

Properties

new HeadTarget head [get]
 The insect-specific head target.
IReadOnlyList< LegTarget > legs [get]
 All legs of the insect.
override float length [get]
 The length of the insect.
Transform legsPivotPoint [get]
 The center pivot point around which the legs rotate when turning.

Member Enumeration Documentation

◆ WalkerType

enum Creatures.Rig.WalkerType
inherited

The type of walker.

Enumerator
Sole 

The creature walks on its soles.

Toe 

The creature walks on its toes.

Member Function Documentation

◆ AlignPose()

override void Creatures.Insects.Rig.AlignPose ( )
virtual

Align the pose.

This will

  • Put ik targets for each left/right pari at the same height
  • 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 from Creatures.Rig.

◆ PoseTargets()

override void Creatures.Insects.Rig.PoseTargets ( )
virtual

Pose the target rig using the IK targets.

Reimplemented from Creatures.Rig.

◆ FindModel()

Transform Creatures.Rig.FindModel ( Transform creatureTransform)
staticinherited

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 )
staticinherited

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 )
staticinherited

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

◆ AlignPair()

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

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.

Member Data Documentation

◆ tail

TailTarget Creatures.Rig.tail
inherited

The target for the tail pose

◆ animator

Animator Creatures.Rig.animator
protectedinherited

The animator for the creature.

This is optional


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