GENERAL
ROTORS
DocumentationBAS 1.0

Burst Animation System 1.0

Build the Playground Humanoid graph

Start with one idle clip. Add walking, running, air states and the Playground pose layers. Try a second character and add crouch.

1. Install BAS and import the sample

You will build the Humanoid Character graph that controls BasBot in Playground. First, make one idle clip play. Then give the character a moving pose, state changes and the other layers in the sample. At the end, you will add something of your own.

  1. Open a Unity 6 project. BAS 1.0.0 requires Unity 6000.0.10f1 or later. Open Window > Package Management > Package Manager.
    Package Manager shows In Project, Unity Registry and My Assets on the left.
    Use the left column to select a package source. In Project shows the packages that Unity has already installed. Select the picture for the full-size view.
  2. If BAS is in your Asset Store library, select My Assets, select Burst Animation System and select Install. If you received a .tgz file, use the + menu, select Install package from tarball and choose that file.
    Unity Package Manager with the plus button, My Assets, and the installed BAS tarball.
    Select My Assets for your Asset Store copy. For a .tgz file, open the + menu. After a local installation, Unity shows Tarball beside the version. Select the picture for the full-size view.
    Package Manager add menu showing Install package from tarball.
    For a .tgz file, select Install package from tarball and choose the file you received. Select the picture for the full-size view.
  3. Under In Project, select Burst Animation System. Open Samples and select Import beside Playground and Gallery. Wait for the import and script compilation to finish.
    The Samples tab has an Import button on the Playground and Gallery row.
    Find Playground and Gallery. Its Import button is at the right end of the row. Select the picture for the full-size view.

Check. Open Tools > Burst Animation System > Samples. You can now open Playground. For help with installation, see the Unity Package Manager instructions.

2. Make a practice copy of Playground

  1. Open Edit > Project Settings > Player. Search for Active Input Handling. Select Input Manager (Old) or Both. Restart Unity if it asks.
    Player settings with Active Input Handling set to Input Manager (Old).
    In Player settings, open Other Settings and find Active Input Handling under Configuration. The sample also supports Both. Select the picture for the full-size view.
  2. Open Tools > Burst Animation System > Samples > Playground. Press Play and click the Game view. Walk with W, A, S and D. Hold Shift to run. Stop Play Mode.
    BasBot stands beside the green pressure plate in the Playground Game view.
    Click in the Game view. Walk past the green plate, then hold Shift to run. Select the picture for the full-size view.
  3. Create a folder named HumanoidLesson under Assets. Use File > Save As to save the open scene there as My Playground. Select BasBot Player in the Hierarchy. Its Graph Animator points to the finished Humanoid Character graph. Click the asset field to locate it in Project. Keep it as your reference.
    The BasBot Player Inspector shows a Character Controller and a Graph Animator with Humanoid Character assigned.
    Select BasBot Player in your practice scene. The Graph field identifies the finished sample graph. Select the picture for the full-size view.

Check. Your practice scene has a working character, camera and movement controls. Keep these components when you change the graph. Exit Play Mode before you edit.

3. Select a character and create an empty graph

A graph calculates a pose. Its source model tells BAS which skeleton to use. A Graph Animator applies the finished pose to a character in the scene. Use BasBot as the source for this lesson so that the sample clips, weapon and bone settings match. You will try a second character in step 10.

  1. In Project, find BasBot.fbx in the imported sample. Select the model asset. In the Inspector, open Rig. Check that its Animation Type is Humanoid and that it has a valid Avatar. An Avatar maps the model's bones to Unity's Humanoid bones.
    BasBot Rig Inspector with Humanoid selected and the Configure button visible.
    Check Animation Type and Avatar Definition on the model. Select Configure to inspect the bone map. Select the picture for the full-size view.
  2. Select Tools > Burst Animation System > Create > Animation Graph. Select Humanoid. Choose BasBot under Available sources, or drag its model into Prefab. For BasBot, keep Root at Prefab root. Set Name to My Humanoid Character, choose your lesson folder in Save folder and select Create Graph.
    The New Animation Graph window shows Humanoid, BasBot, Prefab root, the graph name, Save folder and Create Graph.
    Check the BasBot preview and the graph name. Set Save folder to your lesson folder before you select Create Graph. Select the picture for the full-size view.
  3. Open the new asset. In Class Defaults, set AnimInstance Type to BAS / Examples / HumanoidCharacterAnimInstance. This sample class supplies the movement, aim and foot values that the finished graph reads.
    Class Defaults with HumanoidCharacterAnimInstance selected under AnimInstance Type.
    Choose the sample class in Class Defaults. Its movement and aim fields then become available to the graph. Select the picture for the full-size view.

Check. The window title identifies your new graph. The canvas has an Output Pose endpoint. The Variables panel includes the sample's Forward and IsMovingResult variables.

4. Play one idle clip on BasBot

  1. In Project, find Standing Movement.fbx under the sample's shared animations. Expand the arrow beside the file to see its clips. Drag Standard Idle onto the graph canvas. BAS creates a Clip node with that animation assigned.
    Standard Idle is open in the BAS Clip Editor. The Animation panel lists its name and Humanoid rig beside the preview.
    Standard Idle is the clip to drag from Standing Movement. The Clip Editor shows the motion if you open the clip first. Select the picture for the full-size view.
  2. Drag from the node's Pose output to Result on Output Pose. Select Save. Open the graph preview and start playback. The character should idle.
    Standard Idle connected to Output Pose in the Idle state.
    Drag the wire from Pose on Standard Idle to Result on Output Pose. This is the connection inside the finished Idle state. Select the picture for the full-size view.
  3. In your practice scene, select BasBot Player. On its existing Graph Animator, assign My Humanoid Character in the Graph field. Follow the action next to Status. Use Set Up Character, Save Graph or Compile when prompted. Wait for Ready, save the scene and press Play.
    The Graph Animator graph panel shows the graph field, Source Model and a green Ready status.
    Put your lesson graph in the field that shows Humanoid Character here. Check Status below Source Model. Select the picture for the full-size view.

Check. BasBot plays the idle clip in Game view. The movement keys will change its pose after you add movement to the graph. Stop Play Mode.

5. Blend a walk into a run

A blend takes two poses and a number. At weight 0, it plays pose A. At weight 1, it plays pose B. A value between them mixes both poses.

  1. Keep your idle node. Drag Standard Walk and Standard Run from the same FBX onto the canvas. Right-click the canvas and add Blend 2.
    Standard Walk and Standard Run appear as separate Clip nodes beside the Blend 2 node.
    Each clip has a Pose output. Put the walk node above the run node to make the connections easy to follow. Select the picture for the full-size view.
  2. Connect the walk Pose to Pose A on Blend 2. Connect the run Pose to Pose B. Connect the Blend 2 output to Output Pose in place of the idle connection.
    Standard Walk feeds Pose A, Standard Run feeds Pose B, and Blend 2 feeds Result on Output Pose.
    Follow the upper and lower wires into Blend 2. The third wire sends the blended pose to Result. Select the picture for the full-size view.
  3. Select Blend 2. In Details, set Weight to 0, then 1, then 0.5. Save and play the graph preview at each value. Watch the stride change. Bring the weight back to 0.
    The selected Blend 2 node has Weight set to 0.5 and Source set to constant in Details.
    Use a constant weight while you compare the poses. At 0.5, both clips contribute equally. Select the picture for the full-size view.

Check. You can see a walk, a run and a pose between them. Next, put this branch in its own state. The finished graph will read movement values from the character and will also turn.

6. Give Idle and Moving State their own poses

  1. Right-click your Blend 2 node and choose Wrap in State Machine. BAS moves that branch into a state and connects the machine to the previous output. Name the machine Locomotion. Double-click it. Select the first state and set its Name to Moving State in Details.
    A State Machine sends its Pose to the Result input of Output Pose.
    After you wrap the branch, look for this connection on the outer canvas. Double-click the State Machine to edit its states. Select the picture for the full-size view.
  2. Right-click empty space in the machine and select Create State. Name it Idle. Double-click it, drag Standard Idle onto its canvas and connect its Pose to Output Pose. Use the Locomotion breadcrumb to return. Right-click Idle and select Set as Default State. The Entry arrow should point to Idle.
    The green Entry arrow points to Idle. The Idle card shows ClipNode and Default.
    Check the green arrow. It points to Idle, and the state card shows Default below its clip pose. Select the picture for the full-size view.
  3. Right-click Idle, select Make Transition, then click Moving State. Select the line or its label to edit the rule. In the rule's Graph View, add a getter for IsMovingResult from Variables. Connect it to Condition on the Transition node.
    IsMovingResult connected directly to Condition on the transition.
    The Idle to Moving State rule accepts a true IsMovingResult. Select the picture for the full-size view.
  4. Make a second transition from Moving State back to Idle. In its rule, connect IsMovingResult to a Not node and connect that result to Condition. Each arrow has its own rule.
    IsMovingResult connected through Not to the transition Condition.
    Use Not on the return rule. When movement stops, this rule sends the character back to Idle. Select the picture for the full-size view.

Check. Save and enter Play Mode. In the Graph Editor, choose BasBot Player in the Debug picker. Press W, then release it. The active state should change from Idle to Moving State and back. Stop Play Mode. Remove the spare, disconnected idle node from the outer canvas.

7. Drive speed and turns from the character

The first blend has one control. Playground needs forward speed and turn direction. Its Moving State uses a Blend Space. The samples in that asset are clips placed at different forward and turn values.

  1. Open the reference Humanoid Character graph. Enter Locomotion > Moving State and select its Blend Space node. Click the assigned asset field once to locate the exact asset in Project. Return to the same state in My Humanoid Character.
    The reference graph breadcrumb opens Locomotion and Moving State. The Blend Space node shows BS_2DForward.
    Open Moving State in the reference graph. Its Blend Space node identifies BS_2DForward as the assigned asset. Select the picture for the full-size view.
  2. Add a Blend Space node and assign BS_2DForward. In Variables, use Get beside movementBlendTurn and connect it to X. Connect movementBlendX to Y. Multiply movementBlendSpeed by LocomotionPlaybackMultiplier and connect the result to the playback rate. Show these pins in Details if needed. Connect the pose to the state's Output Pose. Once it plays, remove the first walk/run Blend 2 and its clips from this state.
    The Moving State canvas shows the movement getters, Multiply, Blend Space and Output Pose.
    Follow movementBlendTurn to X and movementBlendX to Y. Multiply feeds Speed. The Blend Space pose feeds the state output. Select the picture for the full-size view.
  3. Save and press Play. Walk forward, hold Shift to run, then steer left and right. The sample movement component reads the keyboard. The selected AnimInstance supplies the graph values. A forward walk gives a lower forward value than a run.
    BasBot in the motion preview. The movement component shows Walk Speed 2, Run Speed 5 and Shift To Run.
    Hold Shift while moving to switch to the sample's run speed. The component has Shift To Run enabled. Select the picture for the full-size view.

Check. The state stays in Moving State as the stride changes. Releasing the keys returns it to Idle. If the character stands still, check the scene character's Graph field, the AnimInstance Type and the two transition directions.

8. Add jumping, falling and landing

Walking and standing can share a state machine with airborne poses. A character can leave the ground because it jumped or because it walked off an edge. Playground has a separate path for each case.

  1. In Locomotion, add Air and Falling. Open the reference machine beside your graph. For each state, open its pose graph. Follow the air-state instructions and rule list below. Work from the innermost clip out to the Locomotion machine.
    The four states in the Playground Locomotion machine and the transitions between them.
    Open the separate Air and Falling machines from these two states. Idle is the default ground state. Select the picture for the full-size view.
  2. For each transition, set its source, destination, rule and blend time. If both graphs use the sample AnimInstance, you can select a reference transition, use Copy Rule and then Paste Rule on the matching transition in your graph. Check its two endpoints and blend settings separately.
    Idle to Moving State has Copy Rule and Paste Rule in its toolbar. Or connects to the final Condition.
    Copy Rule and Paste Rule are in the selected transition's toolbar. The Transition node shows the blend time and curve. Select the picture for the full-size view.
  3. Connect the practice graph to the sample jump check as described below. Save the graph and the practice scene. Run forward, press Space, then try walking off a ledge. In Live Debug, watch the airborne branch and the return to the ground.
    The graph tree lists the nested Air and Falling branches. The test actions appear below.
    The graph tree identifies the two branches to watch during the jump and ledge tests. Select the picture for the full-size view.
Build the four states in Locomotion

Use the imported Playground assets for this part. In Class Defaults, select HumanoidCharacterAnimInstance. Its fields supply the movement, jump and aim values used below. In the sample, Basic Character Movement supplies the movement input to this class.

  1. Use Idle as the entry state. In its pose graph, connect a Clip with Standard Idle to the state output.
    Standard Idle is connected to the Result input of Output Pose.
    Inside Idle, connect the Standard Idle clip directly to the state output. Select the picture for the full-size view.
  2. Open Moving State. Replace the walk/run Blend 2 with a Blend Space. Assign BS_2DForward from the sample's Shared/Blendspaces folder. Connect movementBlendTurn to X and movementBlendX to Y. Multiply movementBlendSpeed by LocomotionPlaybackMultiplier and connect the result to the playback rate. Connect the Blend Space pose to the state output. The two axes control forward motion and turns.
    BS_2DForward sample map with turns across X and idle, walk and run along Y.
    Read the map from bottom to top for forward speed. Read across it for turning. Moving State uses this asset. Select the picture for the full-size view.
  3. Add Air to Locomotion. Open its pose graph. Add a State Machine, connect it to the output, and open it. Add Start, Loop and End. Set Start as the entry state. In Start, connect JumpStart_L and JumpStart_R to inputs False and True of a Select Blend. Select with IsRightFoot. In Loop, play JumpLoop. In End, use a Clip Pose with JumpLand at time 0. Connect each result to its state output. Find these clips under Shared/Animations/Air Movement.
    Air starts at Start, continues to Loop, and finishes at End. Start uses a left or right takeoff clip. End uses JumpLand.
    In Start, IsRightFoot selects the takeoff clip. In End, JumpLand at time zero supplies the landing pose. Select the picture for the full-size view.
  4. Add Falling to Locomotion. Inside its pose graph, connect a second nested State Machine to the output. Add Loop and End, with Loop as the entry state. In Loop, add two looping JumpLoop clips. Enable Mirror on the second clip. Connect them to Select Blend inputs False and True. Use IsRightFoot again. Give both Select Blend nodes a blend time of 0.2 seconds. In End, use JumpLand in a Clip Pose at time 0.
    Falling enters Loop and transitions to End. Two JumpLoop clips feed Select Blend and IsRightFoot selects the pose.
    In Falling, Entry points to Loop. Open Loop to see the two JumpLoop clips and the IsRightFoot selector. Select the picture for the full-size view.

Give each state its own pose output. A disconnected state shows the reference pose when you enter it.

Wire the transition rules

In each machine, select Make Transition on the source state and select the destination. Select the line to open its rule. Connect the last comparison or logic node to Condition. Replace the two simple ground rules from step 6 with the first two rules in the table. The table gives the sample's crossfade times in seconds. Use a Linear curve for the two idle and movement rules. Use SmoothStep for the other rules.

MachineFrom and toConditionSeconds
LocomotionIdle to Moving StateAbsolute value of movementBlendX or movementBlendTurn is greater than 0.01.
Idle to Moving State reads both movement inputs through Abs, Greater and Or.
Either input above 0.01 starts the transition. Both paths finish at the same Or node. Select the picture for the full-size view.
0.2
LocomotionMoving State to IdleAbsolute values of both inputs are 0.01 or less.
Moving State to Idle reads both movement inputs through Abs, Less Or Equal and And.
Both inputs must be at or below 0.01 in absolute value before the machine returns to Idle. Select the picture for the full-size view.
0.2
LocomotionIdle to Air, Moving State to AirIsGrounded is false and StartedJump is true. Enable Forceable on the line from Moving State.
The Moving State to Air rule tests IsGrounded and StartedJump through Equal and And.
The rule requires an airborne character and a jump that has started. The header identifies this line from Moving State. Select the picture for the full-size view.
0.12
LocomotionIdle to Falling, Moving State to FallingIsGrounded and StartedJump are both false.
The airborne fall rule compares IsGrounded and StartedJump and combines the results.
Both comparisons must pass to enter Falling. The Transition node displays the fall blend time. Select the picture for the full-size view.
0.9
LocomotionAir to Moving State, first lineIsGrounded is true and JumpVelocity is greater than −2.
The first Air to Moving State rule checks IsGrounded and JumpVelocity greater than negative two.
Use this landing line when JumpVelocity is greater than −2. Read the unrounded blend time from the table. Select the picture for the full-size view.
0.078494646
LocomotionAir to Moving State, second lineIsGrounded is true and JumpVelocity is −2 or less.
The second Air to Moving State rule checks IsGrounded and JumpVelocity less than or equal to negative two.
This line handles JumpVelocity at or below −2. Read the unrounded blend time from the table. Select the picture for the full-size view.
0.12137242
LocomotionFalling to Moving StateIsGrounded is true. Enable Forceable.
The Falling to Moving State rule checks IsGrounded before it enters the ground state.
Falling can return to Moving State when IsGrounded is true. Select the picture for the full-size view.
0.12
AirStart to LoopConnect Time to Blend Out to Condition. BAS starts the transition before the takeoff clip ends.
Time to Blend Out connects directly to the Condition input for Start to Loop.
The Air machine starts this transition in time to blend out of its takeoff clip. Select the picture for the full-size view.
0.2
Air and FallingLoop to End in each machineGroundDistance is 1 or less and JumpVelocity is 0 or less.
The Loop to End rule tests GroundDistance and JumpVelocity before it enters the landing state.
Both comparisons must pass to enter End. Use the same condition in the Air and Falling machines. Select the picture for the full-size view.
0.16
Connect the sample jump check to your new states

The sample movement script checks the saved IDs of the two original ground states before it allows a jump. Your new graph has new state IDs. This small edit lets the practice character use your two state names.

  1. Open the imported sample's BasicCharacterMovement.cs under Assets. Inside the class, add this field beside the other Inspector fields.
    Use Lesson Ground States is checked in the Inspector. The matching serialized field appears below.
    Add the C# field, save and wait for Unity to compile. Use Lesson Ground States appears under Ground support in Basic Character Movement. Select the picture for the full-size view.
[SerializeField] private bool useLessonGroundStates;

In FixedUpdate, find the loop that starts with foreach (var state. Replace that loop, including its original if body, with this code. Keep the jump and grounding code that follows it.

foreach (var state in graphAnimator.Instance.CaptureActiveStates())
{
    bool groundState = useLessonGroundStates
        ? state.Source.Label == "Idle" || state.Source.Label == "Moving State"
        : state.Source.StateId == "7a0479ebad54" || state.Source.StateId == "8883deb61f89";

    if (groundState && state.ActiveBranch && state.Phase == StateFeedbackPhase.FullyInState)
    {
        eligible = true;
        phase = (float)state.NormalizedTime;
        break;
    }
}

Save and wait for Unity to compile. On BasBot Player > Basic Character Movement in your practice scene, enable Use Lesson Ground States. Leave it off on actors that use the original graph. The lesson uses these two labels only in the outer Locomotion machine.

Use Lesson Ground States enabled on the practice character.
After the script compiles, enable this field on the character that uses your new graph. Select the picture for the full-size view.

9. Finish the Playground Humanoid Character graph

Return to the outer Pose Graph. Locomotion supplies the body pose. Build the remaining branches in the order below. After each group, connect its last pose to Output Pose, save and try its check. When you add the next group, continue from that pose.

Playground Humanoid Character pose graph with cached locomotion and upper-body layers
Trace the pose wires from locomotion through the upper-body layers. Use the wiring instructions for the settings in BAS 1.0.0. Select the picture for the full-size view.
Connect the landing, aim and carry branches

In Graph Settings, keep Shared Animations set to All. The imported Samples Clip Settings supplies the play names Air/Landing and Pistol/Shoot. After you save, use Animation Registry to check that the clips are prepared for BasBot. For named slot entries, open Tools > Burst Animation System > Settings > Project Slot List. Add Locomotion and Pistol if needed, then save. DefaultSlot is built in.

  1. On the main canvas, connect the Locomotion State Machine to a Slot named Locomotion. Feed that slot to a Save Cached Pose named Locomotion. The landing montage can now affect the pose before the graph reuses it.
    Locomotion state machine, Locomotion slot and Save Cached Pose.
    Follow the wire from the state machine through the Locomotion slot to the pose cache. Select the picture for the full-size view.
  2. Add two Use Cached Pose nodes for that cache. Send the first to the base input of Apply Additive. For its additive input use a Clip with Pistol_Aim_One_Hand Additive. Use mesh space and weight 1. Find the pistol clips under Shared/Animations/Pistol Animations.
    Use Cached Pose and the additive pistol clip feed Apply Additive.
    The top wire supplies the cached movement. The lower wire supplies Pistol_Aim_One_Hand Additive. The node shows Mesh Space and Alpha 1. Select the picture for the full-size view.
  3. Add a Clip with Pistol_Aim_One_Hand. Connect it to a Slot named Pistol. Make a Layered Blend with Apply Additive as the base and the Pistol slot as its layer. Use mesh space, weight 1 and a mask rooted at Right Shoulder. The slot can now play the shooting animation on that branch.
    The pistol clip and Pistol slot feed a Layered Blend beside Apply Additive.
    The slot supplies the layer input. The pose from Apply Additive supplies the base. Select the picture for the full-size view.
  4. Add a Blend 1D. Connect the second Use Cached Pose to threshold 0. Connect the Layered Blend to threshold 1. Bind AimWeight to the parameter. At 0 you get ordinary movement. At 1 you get the aiming pose.
    The locomotion cache and pistol layer connect to Blend 1D and AimWeight.
    Follow the two pose wires into Blend 1D. The green AimWeight getter drives its parameter. Select the picture for the full-size view.
  5. Add a second Layered Blend with the Blend 1D as its base. Add a Clip Pose for Pistol_Aim_One_Hand at time 0 as its layer. Set the layer weight to CarryWeight. Use a branch filter on Right Hand with depth 0. Leave mesh space off for this layer.
    Blend 1D and a pistol Clip Pose feed the carry Layered Blend.
    The Layered Blend takes its base from Blend 1D, its layer from Clip Pose at time zero, and its weight from CarryWeight. Select the picture for the full-size view.
  6. Connect that result to the base of Aim Offset. Assign AO_Pistol. Bind X to AimX, Y to AimY, and the weight to AimWeight. Feed the result through a Slot named DefaultSlot.
    AimX, AimY and AimWeight connect to AO_Pistol. Its pose feeds DefaultSlot.
    The Aim Offset node shows AO_Pistol. Follow its output wire to the slot named DefaultSlot. Select the picture for the full-size view.

Use the slot and play names exactly. The sample plays the named Air/Landing clip in Locomotion and Pistol/Shoot in Pistol. Test with the existing BasBot Player in your practice scene so its camera, movement and aim components supply the inputs.

Connect head tracking and ground contact

Check that BasBot's skeleton includes ik_foot_l and ik_foot_r. These are virtual bones that supply targets for the feet. If your graph defines its own Humanoid virtual bones, enable Graph Settings > Virtual bones > Humanoid IK Bones before choosing the targets.

Use the sample's BasBot as the graph's main rig to reproduce its look directions. The stored forward axes below belong to that model. The coordinates for the look targets and ground offsets are in World space.

  1. After DefaultSlot, add a Look At on Head. Bind FreeLookTarget and FreeLookWeight. Set the maximum angle to 60 degrees and smoothing to 0.08. For BasBot, the forward axis is approximately (−0.7562, 0.4978, −0.4247).
    DefaultSlot feeds Aim Head, a Look At node bound to FreeLookTarget and FreeLookWeight.
    Aim Head follows DefaultSlot. Its two bound inputs are FreeLookTarget and FreeLookWeight. Select the picture for the full-size view.
  2. Add another Look At on Right Hand. Bind HandAimTarget and AimWeight. Set the maximum angle to 35 degrees, smoothing to 0.08 and the forward axis to approximately (0.1953, 0.9720, 0.1308).
    Aim Head, Right Hand Aim and the AimWeight getter in the pose graph.
    Right Hand Aim targets Right Hand. The node shows HandAimTarget and takes its weight from the green AimWeight getter. Select the picture for the full-size view.
  3. Add three Bone Modify nodes in sequence. On the first, select the virtual bone ik_foot_l and use LeftFootOffset and LeftFootRotation for position and rotation. On the second, use ik_foot_r, RightFootOffset and RightFootRotation. On the third, select Hips and apply the position offset HipOffset. Set the bound inputs to World and the weights to 1.
    Left Ground Goal, Right Ground Goal and Ground Pelvis show their offset inputs.
    Read the two foot goal nodes first. Their inputs use the left and right foot offsets and rotations. Ground Pelvis uses HipOffset. Select the picture for the full-size view.
  4. Add Two Bone IK for the left upper leg, lower leg and foot. Use Target and Pole. Set target position to zero and target rotation to identity in Bone space relative to ik_foot_l. Leave the pole at its default. Set tip rotation to Copy From Target. Repeat on the right with ik_foot_r. Connect the right solver's pose to the main Output Pose.
    Left Foot IK, Right Foot IK and Output Pose.
    Both foot nodes use Two Bone IK. The final wire connects Right Foot IK to Result on Output Pose. Select the picture for the full-size view.

For the sample's settings, open Class Defaults. Set Free Look Hysteresis to 30, Ray Depth to 0.62, Foot Rise Limit to 0.36, Foot Drop Limit to 0.4, Foot Spring Time to 0.06, Hip Drop Limit to 1.05 and Hip Spring Time to 0.04. Keep the other initial settings of HumanoidCharacterAnimInstance. Save and check the feet on level ground and on the steps.

Foot IK settings in the sample Humanoid graph Class Defaults.
Compare Ray Depth and the foot and hip limits and spring times with the values in the sample. Select the picture for the full-size view.

Check the finished graph. On the same BasBot Player in your saved scene, check idle, walk, run, turns, jump, landing and foot contact. Hold the right mouse button to aim. Click the left button while aiming to fire. Compare those actions with the original Playground scene. A change in one branch should leave the other actions available.

10. Run the same graph on your character

  1. Import your character model into Assets. Select it in Project. In Rig, set Animation Type to Humanoid and Avatar Definition to Create From This Model. Select Apply. Open Configure, check the required bone assignments and correct the reference pose if Unity reports a problem. Select Done.
    Rig Inspector for the second character showing Humanoid, Create From This Model and Configure.
    Apply the import settings, then select Configure to inspect the target Avatar. Select the picture for the full-size view.
  2. Place the model beside BasBot in your practice scene. Drag My Humanoid Character from Project onto the new character's root in the Hierarchy. Clear the controller on any Unity Animator that also drives this skeleton. Follow the Graph Animator Status action until it shows Ready.
    The second character uses My Humanoid Character and Robot Kyle. Its Status row offers Set Up Character.
    The Graph field names your saved graph. The Source Model field identifies the new character. Select Set Up Character on the Status row. Select the picture for the full-size view.
  3. Keep BasBot as the graph's main rig. A different Humanoid rig outside the native bake list uses Borrow automatically. BAS runs the graph on its main rig and converts the final pose to the new Avatar. Open Debug on the new Graph Animator to inspect its playback mode.
    Expanded Debug foldout showing Playback mode set to Borrow.
    Read Playback mode in the Debug foldout on the second character. Borrow confirms that it uses the main rig’s prepared animation. Select the picture for the full-size view.
  4. To walk with the new character, add Basic Character Movement to the same root as its Graph Animator. Enable Use Lesson Ground States on this movement component too. Fit the Character Controller capsule to the body with its bottom at the soles. Disable the original BasBot Player in this scene. On BasBot Gameplay Camera > Basic Camera Controller, assign the new root to Target. Save and test. Weapon attachments and aiming need the matching sample components and references on the new character.
    Basic Character Movement and Character Controller on the second Humanoid.
    Select the character root. Fit its Character Controller to the model and enable Use Lesson Ground States on its movement component. Select the picture for the full-size view.
    Basic Camera Controller with its Target set to Second Humanoid.
    Select the gameplay camera and put the new character root in Target. Select the picture for the full-size view.
Unity Avatar configuration with a green body map and named bone assignments.
Check the green bone assignments on the second character. Select Done to return to the Inspector. Select the picture for the full-size view.

Check. Look at the feet at rest and the knees during a step. A different body shape can change hand and foot contact. To prepare clips specifically for the new proportions, use Bake for followed by the rig name in the Graph Animator, or add the rig under Graph Settings > Rigs > Bake natively for, then prepare it. A Generic rig needs an explicit map. See Direct Retarget Profile.

11. Add crouch inside the two ground states

Keep the finished graph and make this change in a duplicate. Assign the duplicate to the practice character. The sample already reads C to prevent jumping. You will give that key a visible crouch pose while standing and a crouch walk while moving.

  1. Import a looping crouch idle clip and a looping crouch walk clip for a compatible Humanoid. Use a crouch walk with root travel if you want the Playground movement controller to take its travel from the clip. Check the clips on your character in the Clip Editor.
    Crouch Walk clip settings with Loop Time enabled.
    Check Loop Time on the crouch walk clip and on the crouch idle clip. Apply any changes before you add the clips to the graph. Select the picture for the full-size view.
  2. In the graph's Variables panel, select + Add. Name the variable CrouchWeight, choose Float and select Create. In Details, use Writer > Input and a default of 0.
    CrouchWeight selected in Variables. Details shows Float, Input and a default of zero.
    Check the spelling, type and writer. Both ground states read this same variable. Select the picture for the full-size view.
  3. Open Locomotion > Idle. Add a Clip for crouch idle and a Blend 2. Connect the original idle pose to Pose A and the crouch idle pose to Pose B. Connect the blend output to this state's Output Pose. In the Blend 2 details, enable Show pin · Weight if needed. Drag a getter for CrouchWeight onto the canvas and connect it to Weight.
    Standard Idle and a crouch idle clip node wired to Blend 2, with CrouchWeight on Weight.
    Inside Idle, the original clip feeds Pose A. The crouch clip feeds Pose B. Connect the green getter to Weight. Select the picture for the full-size view.
  4. Open Locomotion > Moving State. Repeat the wiring. This time the original locomotion Blend Space goes into Pose A, and the crouch walk Clip goes into Pose B. Use the same CrouchWeight variable. Save the graph.
    The moving Blend Space and a crouch walk clip node connected through Blend 2 to Output Pose.
    Inside Moving State, keep the Blend Space on Pose A. Connect the crouch walk node to Pose B and CrouchWeight to Weight. Select the picture for the full-size view.

Create CrouchInput.cs in your lesson folder. Replace its contents with the code below. After Unity compiles it, add Crouch Input to the character that has Graph Animator. The script moves the weight towards 1 while C is held and back towards 0 when released.

using BAS;
using UnityEngine;

[RequireComponent(typeof(GraphAnimator))]
public sealed class CrouchInput : MonoBehaviour
{
    private GraphAnimator actor;

    private void Awake()
    {
        actor = GetComponent<GraphAnimator>();
    }

    private void Update()
    {
        float target = Input.GetKey(KeyCode.C) ? 1f : 0f;
        actor.SetFloat("CrouchWeight", target, 0.12f, Time.deltaTime);
    }
}
CrouchInput script in the Unity Inspector showing the C key and the CrouchWeight write.
Check that the script writes the graph variable named CrouchWeight when you hold C. Select the picture for the full-size view.
The practice character has the Crouch Input component.
Add Crouch Input to the GameObject with Graph Animator. Unity displays the attached script here. Select the picture for the full-size view.
Idle and Moving State with the expected poses for crouch weights zero and one
Use the two rows to check each end of the blend in both ground states. Select the picture for the full-size view.

Test it. Enter Play Mode and click the Game view. Hold C at rest, walk with C held, then release C while walking. Check crouch idle, crouch walk and the return to standing movement. Try a jump after you release C. If the weight changes but the pose stays the same, check the Blend 2 output inside the active state. This exercise changes the animation. To pass under low obstacles, the movement code must also change the capsule height and check the space above the character before it stands.