Channel Animation
Channel methods are exposed on BeastAnimator. They let application code drive one animation family directly.
For the no-code and keyframing counterpart, see the generated BeastAnimationBridge API reference. It provides a single list of the animatable pose properties and bridge methods available for body, head, ears, eyes, eyelids, tail, mouth, neck, and legs.
Most looping channel methods have two overloads:
- the simple overload uses Unity time automatically, with
Time.deltaTimein Play Mode and a stable1 / 60step in Edit Mode; - the overload with
deltaTimeis for custom timing, deterministic tests, editor preview,FixedUpdate, or any controller that owns its own clock.
In normal gameplay code, prefer the simple overload and call it every frame while the behavior is active.
For direct pose APIs such as SetEarPose or SetBodyPose, weight controls how strongly the manual pose is applied: 0 leaves the generated rest pose, 1 applies the full pose, and intermediate values interpolate between them. Calling a pose API takes ownership of that channel until the pose is reset or stopped.
Manual pose and procedural animation are two different ways to own the same channel. For example, an ear cannot be both procedurally flapping and held by SetEarPose at the same time. Eye look pose and eye opening pose are separate pose values and can be combined, but either one should be treated as manual eye channel control when mixed with eye animation.
Variable part families use a shared public index convention for pose APIs:
0applies the pose to every part in that family;1targets the first generated part;- higher values follow the generated layout order;
GetLastEarIndex(),GetLastEyeIndex(),GetLastTailIndex(), andGetLastLegIndex()return the highest individual index currently available.
Typical use cases:
- rotate visible eyes to look left, right, up, or down while the pupil stays fixed on the eye surface;
- set eyelid opening for a blink or facial state;
- flap ears with custom amplitude and speed;
- add body, head, neck, mouth, tail, or leg motion from gameplay code.
Common Value Ranges
The C# API accepts regular float values so application code can go beyond the inspector when it needs exaggerated motion. The ranges below are the recommended authoring ranges used by the demos and no-code bridge.
| Value | Recommended range | Notes |
|---|---|---|
weight |
0 to 1 |
0 keeps the generated rest pose, 1 applies the full animation or pose. |
cyclesPerSecond |
0.05 to 6 |
Use positive values for looping motion. 0 is useful only when a controller wants no phase advance. |
phaseOffset |
-1 to 1 |
Normalized cycle offset. Values repeat every full cycle. |
bobHeight, lungeLength |
about -0.5 to 0.5 |
Local unit offsets. Small values usually look best. |
| Eye look pose | -45 to 45 degrees |
Applies to the visible eye surface, so the pupil follows the eye. |
| Ear pose | -90 to 90 degrees |
Flap, pitch, and yaw. |
| Tail pose | -70 to 70 degrees |
Pitch, yaw, and roll. |
| Mouth opening pose | 0 to 70 degrees |
Lower-jaw opening. |
| Neck pose | -40 to 40 degrees |
Pitch and yaw. |
| Leg pose | -120 to 120 degrees |
Upper leg, lower leg, and foot FK pitch. |
| Eyelid opening | 0 to 1 |
0 closes the eyelids, 1 opens them. |
Eyes
Use eye APIs when the application wants direct expression control.
BeastAnimator animator = GetComponent<BeastAnimator>();
animator.AnimateEyeLookSideToSide(
weight: 1f,
yawDegrees: 8f,
pitchDegrees: 3f,
cyclesPerSecond: 0.8f,
phaseOffset: 0f);
Eyelid opening is not a looping animation by itself. It sets a pose value, so the application can decide whether to make a blink, a slow close, or a fixed expression.
animator.SetEyeLookPose(weight: 1f, yawDegrees: 10f, pitchDegrees: -4f);
animator.SetEyeOpeningPose(0f); // closed
animator.SetEyeOpeningPose(1f); // open
Use indexed overloads when one eye should look or blink independently.
animator.SetEyeLookPose(eyeIndex: 1, weight: 1f, yawDegrees: 12f, pitchDegrees: 0f);
animator.SetEyeOpeningPose(eyeIndex: 2, opening: 0f);
Ears
Ear animation can flap around several axes.
animator.AnimateEarFlap(
weight: 1f,
flapDegrees: 10f,
pitchDegrees: 4f,
yawDegrees: 2f,
cyclesPerSecond: 1.2f,
phaseOffset: 0f);
Use SetEarPose for a fixed or externally keyframed ear pose.
int lastEarIndex = animator.GetLastEarIndex();
if (lastEarIndex >= 1)
animator.SetEarPose(earIndex: 1, weight: 1f, flapDegrees: 20f, pitchDegrees: 0f, yawDegrees: 4f);
Body and Head
Body and head channels can be animated procedurally or placed directly.
Body motion affects the body transform. Neck, head, and tail are visually attached to it, but legs are handled separately so a body bob or lunge does not simply drag the whole creature across the ground.
animator.SetBodyPose(
weight: 1f,
bobHeight: 0.02f,
lungeLength: 0.03f,
pitchDegrees: 4f,
rollDegrees: -3f);
animator.SetHeadPose(
weight: 1f,
bobHeight: 0.01f,
pitchDegrees: 8f,
yawDegrees: -10f,
rollDegrees: 6f);
Tail
Tail animation pivots from the generated tail anchor, so the visible tail keeps its generated offset from the body.
animator.AnimateTailSway(
weight: 1f,
pitchDegrees: 4f,
yawDegrees: 18f,
rollDegrees: 6f,
cyclesPerSecond: 0.7f,
phaseOffset: 0f);
Use SetTailPose when the application wants to keyframe or compute a fixed pose instead of starting a looping sway.
int lastTailIndex = animator.GetLastTailIndex();
if (lastTailIndex >= 1)
animator.SetTailPose(tailIndex: 1, weight: 1f, pitchDegrees: 8f, yawDegrees: 16f, rollDegrees: 0f);
Mouth
The mouth channel currently drives the lower-jaw pivot. It can be used as a procedural open/close loop or as a direct pose.
animator.AnimateMouthOpenClose(
weight: 1f,
openDegrees: 18f,
cyclesPerSecond: 1.2f,
phaseOffset: 0f);
animator.SetMouthOpeningPose(weight: 1f, openDegrees: 12f);
Neck
The neck channel moves the generated neck transform. Because the head is parented under the neck, neck motion carries the whole head assembly; the head channel can still add local motion on top.
animator.AnimateNeckMotion(
weight: 1f,
bobHeight: 0.01f,
pitchDegrees: 2f,
yawDegrees: 3f,
cyclesPerSecond: 0.5f,
phaseOffset: 0f,
bobFrequency: 1f,
centeredBob: true,
pitchPhaseOffset: 0f,
yawPhaseOffset: 0.25f);
Legs
Legs are normally driven by locomotion clips such as Walk and Rush. The channel API also exposes a simple direct pose for applications that want to keyframe or compute a leg gesture themselves.
animator.SetLegPose(
legIndex: 0,
weight: 1f,
upperPitchDegrees: -18f,
lowerPitchDegrees: 36f,
footPitchDegrees: -12f);
legIndex uses a stable public order:
0applies the pose to all legs;1targets the front-left leg;2targets the front-right leg;3and4target the next left/right pair toward the rear, and so on.
Use GetLastLegIndex() when application code needs to know how many individual leg indices are available on the currently bound Beast.
int lastLegIndex = animator.GetLastLegIndex();
for (int legIndex = 1; legIndex <= lastLegIndex; legIndex++)
{
animator.SetLegPose(
legIndex,
weight: 1f,
upperPitchDegrees: -12f,
lowerPitchDegrees: 24f,
footPitchDegrees: -8f);
}
This first leg pose API is an FK pose, not an IK target and not a locomotion cycle. When a single leg index is used, the other legs are kept at their generated rest pose while the leg channel is owned by the manual pose.
Stopping a Channel
Each channel can be released independently.
animator.StopEyeAnimation();
animator.StopEarAnimation();
animator.StopBodyAnimation();
animator.StopHeadAnimation();
animator.StopTailAnimation();
animator.StopMouthAnimation();
animator.StopNeckAnimation();
animator.ResetLegPose();