|
Creature Control for Unity v0.1
|
A leg in a TargetRig which is used to control a leg in a model.
Public Member Functions | |
| override void | MatchTo (Bone bone) |
| Function to match the target to the selected bone. | |
| override void | Unmatch () |
| Set properties for the case no matching bone exists. | |
| void | PoseTargetLimb () |
| Pose the target limb. | |
| void | UpdateBones (Leg leg) |
| Update the bones of the from this target. | |
| virtual void | Align () |
| Align the pose. | |
| virtual void | UpdateBones (Bone bone) |
| Update the pose of the bone from this target. | |
Static Public Member Functions | |
| static float | CosineRule (float a, float b, float c) |
| Implementation of the Law of Cosines. | |
Public Attributes | |
| Transform | coxaTarget |
| The target for the coxa bone. | |
| Transform | femurTarget |
| The target for the femur bone. | |
| Transform | tibiaTarget |
| The target for the tibia bone. | |
| Transform | tarsus |
| The target for the tarsus bone. | |
| Transform | phalangesTarget |
| The target for the phalanges bone. | |
| Transform | end |
| The end target of the leg chain. | |
| Transform | tarsusEnd |
| The end transform of the tarsus. | |
| float | length |
| The length of the leg from hip to foot. | |
| float | femurLength |
| The length of the femur target. | |
| float | tibiaLength |
| The length of the tibia target. | |
| float | tarsusLength |
| The length fo the tarsus target. | |
| Transform | ikTarget |
| The target for the inverse kinematics. | |
| LegTarget | otherLeg |
| The target of the leg on the other Side of the body. | |
| Quaternion | targetToBoneFemur |
| The rotation to get from the target to the models' femur bone. | |
| Quaternion | targetToBoneTibia |
| The rotation to get from the target to the models' tibia bone. | |
| Quaternion | targetToBoneTarsus |
| The rotation to get from the target to the models' tarsus bone. | |
| Rig | rig |
| The target Rig to which this target belongs. | |
| bool | isMatched = false |
| Is this target matched to a bone? | |
| Quaternion | targetToBone |
| The rotation to transform the target rotation into the rotation of the bone in the model. | |
Protected Member Functions | |
| Quaternion | FemurRotation (Vector3 targetPosition) |
| Calculate the femur target orientation in world space. | |
| Quaternion | TibiaRotation (Vector3 targetPosition) |
| Calculate the tibia target orientation in world space. | |
| Vector3 | GetTibiaUpWorld () |
| Quaternion | TarsusRotation (Quaternion targetRotation) |
| Calculates the tarsus rotation in world space. | |
| void | UpdateFemur (Transform femurBone) |
| Update the pose of the femur bone based on its target. | |
| void | UpdateTibia (Transform tibiaBone) |
| Update the pose of the tibia bone based on its target. | |
| void | UpdateTarsus (Transform tarsusBone) |
| Update the pose of the tarsus bone based on its target. | |
|
virtual |
Function to match the target to the selected bone.
| bone | The bone to match to |
This will put the target at the bone position and orientation and calculate the targetToBone rotation When the bone is null, the value isMatched will become false
Reimplemented from Creatures.Target.
|
virtual |
Set properties for the case no matching bone exists.
Reimplemented from Creatures.Target.
| void Creatures.LegTarget.UpdateBones | ( | Leg | leg | ) |
Update the bones of the from this target.
| leg | The creature's leg to update |
|
protected |
Calculate the femur target orientation in world space.
| targetPosition | The inverse kinematics target position |
|
protected |
Calculate the tibia target orientation in world space.
| targetPosition |
|
protected |
Calculates the tarsus rotation in world space.
| targetRotation | The orientation of the inverse kinematics target |
|
protected |
Update the pose of the femur bone based on its target.
| femurBone | The femure bone Transform |
|
protected |
Update the pose of the tibia bone based on its target.
| tibiaBone | The tibia bone Transform |
|
protected |
Update the pose of the tarsus bone based on its target.
| tarsusBone | The tarsus bone Transform |
|
static |
|
virtualinherited |
Align the pose.
This will make the pose of the creature symmetric
Reimplemented in Creatures.HeadTarget, Creatures.Insects.HeadTarget, and Creatures.TailTarget.
|
virtualinherited |
Update the pose of the bone from this target.
| bone | The bone for which the pose is updated |
Reimplemented in Creatures.Insects.AntennaTarget, and Creatures.Insects.HeadTarget.
| Transform Creatures.LegTarget.coxaTarget |
The target for the coxa bone.
Another name is the hip bone
| Transform Creatures.LegTarget.femurTarget |
The target for the femur bone.
Another name is the upper leg or thigh
This target is currently not supported
| Transform Creatures.LegTarget.tibiaTarget |
The target for the tibia bone.
Another name is the lower leg or shank
| Transform Creatures.LegTarget.tarsus |
The target for the tarsus bone.
Another name is the foot
| Transform Creatures.LegTarget.phalangesTarget |
The target for the phalanges bone.
Another name is the toes No individual toe bones are supported
This target is currently not supported
| float Creatures.LegTarget.length |
The length of the leg from hip to foot.
This is used for the inverse kinematics calculations
| Transform Creatures.LegTarget.ikTarget |
The target for the inverse kinematics.
This target is normalle at the foot bone