Setting Up Grounded Puppet Physics

Section 1: Control Rig

We will be using the Titanosaur as an example creature.

3. Import the Titanosaur hierarchy.

4. Open the Preview Scene Settings tab and select Titanosaur as preview mesh.

5. Unplug the Forward Solve node so that you can see the skeleton in reference pose.
Select all the bones that you want to be simulated. This is the equivalent of adding physics bodies to a selection of bones.

Now drag the selection into the graph and choose Create Item Array.

6. Duplicate the array and replace the old arrays that are commented as “Effector Bones” and “Parent Bones”.

For each effector, define its parent in the parent bones array. The parent bone needs to be one of the effector bones, with the exception of the root bone.

7. Make sure that all “Settings_*” variables have a length equal or greater than the effector bones array.
8. Connect the effector and parent bonres array to the function GroundConform_Constructor. If you get warnings about node run limit, increase it in the Class Settings:

9. Connect the Forwards Solve again.

10. Adjust Settings_TraceRadii until you can see the red collision spheres. Always compile to see the changes to default values. This can be fine tuned later in the map.

11. Go to the Full Body IK node and set “Root” to the hip bone, or the first bone that comes after the root bone. Remove all array elements of the Bone Settings.

Section 2: Hooking up the Control Rig in the Character Blueprints

Creating the AnimBP Linked Graph

2. You can copy-paste the nodes from Sauropod_GroundConform_AnimBP into the new AnimBP.

After pasting this, add an “Input Pose” node and reconnect the nodes like in the example above.

3. Select the Control Rig node and set the class to the Titanosaur_GroundConform_CtrlRig.

4. Right-click the Anim Instance node and choose “Create variable”. Click the Eye icon to make the variable “Instance Editable”. Compile and save.

This variable must be named AnimInstance so that the linked anim graph works. It must also be marked as editable or the editor will crash.

5. Copy-paste the event graph of the Dodo_GroundConform_AnimBP into Titanosaur_GroundConform_AnimBP. Then right-click the “Set Variable” nodes and choose “create variable”.

6. In the Anim Graph, to connect the new variables “isBeingDragged” and “bSwimmingMovement” to the Control Rig, you will first have to select the Control Rig and choose “Use Pin” for the inputs to be exposed.

 Setting up the Character_BP

Link the Anim Graph

Then hover the mouse over the AnimBP to find the Parent Class.

Another way to find the parent class is to open the Titanosaur_AnimBP and click at the edit button in the upper right corner.

2. Check if this parent AnimBP has a GroundConform Linked Anim Graph before the Output Pose. If it doesn’t, you will need to create a GroundConform_AnimBP for the dino of this AnimBP.

For example, let’s say we are working on the Basilosaurus and the parent class DinoBlueprintBase_RootTransform does not have the linked graph added yet. It uses the Ptero mesh so now we have to create an AnimBP called Ptero_GroundConform_AnimBP and put it into Ptero/Rig/. To use this as a placeholder, add the AnimInstance variable and make it editable. Add an Input Pose node and connect it to the Output Pose. Now you can place this Ptero Linked Anim Graph in the DinoBlueprintBase_RootTransform AnimBP and set the Tag to GroundConform. Now that we have the linked graph in the parent class, we can continue.

3. Open Titanosaur_Anim_BP and go to the event graph. Add the “Event Blueprint Initialize Animation”.

4. Add a node “Link Anim Graph by Tag”. Set the In Tag to “GroundConform” and the In Class to the AnimBP we created earlier: Titanosaur_GroundConform_AnimBP
Compile and Save


6. Test if everything is hooked up correctly. Play in editor, spawn a dino and kill it to see the grounded puppet physics activate:

cheat spawnactortamed /Script/Engine.Blueprint'/Game/PrimalEarth/Dinos/Titanosaur/Titanosaur_Character_BP.Titanosaur_Character_BP'

cheat killaoe tamed 10000

To view the debug draws of the control rig, use the command:

a.AnimNode.ControlRig.Debug 1


 Now that everything is working in PIE, it is a good time to adjust the control rig settings.