CharacterEye
A class in Root.Township, Alta.Character.
Build-time setup for one character eye: when the prefab is baked it copies its position to the dummy's eye bone, adds a rotation limit and hands both to EyeFocus, then removes itself.
- Listed in Players and characters
- Inherits or implements
MonoBehaviour,IBuildRendererBakeable,IBuildBakeable - Nested types
RotationLimit
Constructors
| Member | What it is |
|---|---|
CharacterEye() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
6 private and internal fields
| Member | What it is |
|---|---|
private BoneIdentifier bone | Which rig bone is the eye. |
private CharacterDummyPointer dummy | Pointer to the character dummy whose rig holds the eye bone. |
private Transform eyeBone | The eye bone found during baking. |
private EyeFocus eyeFocus | The EyeFocus component set up with the eye bone and its limit. |
private RotationLimitSpline limit | The rotation limit added to the eye bone during baking. |
private CharacterEye.RotationLimit limitArguments | Axis, default rotation, twist limit and spline copied onto the eye's rotation limit. |
Properties
1 private and internal property
Methods
| Member | What it is |
|---|---|
void Bake(bool isSaving) | Finds the eye bone on the dummy rig, copies this transform's local pose to it, adds a disabled RotationLimitSpline from limitArguments and sets up eyeFocus. |