The Ultimate Character Controller is integrated with PuppetMaster allowing your character to become a puppet when colliding with other objects. While both first and third person are support from the character controller side of things, we imagine that this integration will primarily be used for third person characters. When the PuppetMaster integration is used Unity’s ragdoll system should not be added to the character.
Ultimate Character Controller
First Person Controller
Third Person Controller
UFPS: Ultimate First Person Shooter
UTPS: Ultimate Third Person Shooter
UFPM: Ultimate First Person Melee
UFPM: Ultimate Third Person Melee
Before setting up the integration it is recommend that you have first independently setup a Ultimate Character Controller character and PuppetMaster puppet before.
- Create a “Collision” and “Ragdoll” layers. In our demo scene the Collision layer is index 24, and Ragdoll layer is index 25.
- Disable collisions between Character-Ragdoll and Character-Collision layers.
- Add a character model to the scene.
- Duplicate the character.
- Add Biped Ragdoll Creator.cs to the duplicate, click on “Create Ragdoll” and “Done” or “Start Editing Manually” if you wish to edit.
- Ensure the project and scene are setup through the Ultimate Character Controller Setup Manager.
- Open Tools/Opsive/Ultimate Character Controller/Character Manager. Assign the original character (not the duplicate) and ensure the “Ragdoll” toggle is disabled. Click on “Build Character”.
- Add PuppetMaster to the duplicate, set “Character Controller Layer” to the layer number of “Character” and “Ragdoll Layer” to “Ragdoll”. Assign the original character as “Animated Target”.
- Click on “Set Up PuppetMaster”.
- Drag the “Puppet Behaviour (UCC)” prefab from the integration folder and drop it under the “Behaviours” GameObject.
- Set the Behaviour Puppet’s Ground Layers field to “Default”.
- Set the Behaviour Puppet’s Collision Layers field to “Collision”.
- Add the “Ragdoll” layer to the Invisible Layers mask in the Character Layer Manager component on the character.
- Add “Puppet” ability to the Ultimate Character Locomotion’s Abilities, assign the “Puppet” and “Puppet Master” fields.
- Copy the “BehaviourPuppet” and “BehaviourFall” Sub-State Machines over from the “PuppetMasterDemoAnimator” animator controller in the integration folder to the animator controller used by your character.
- Go to the Character IK component on the character and remove the “Ragdoll” layer from it’s “Layer Mask”.
- Remove the “Ragdoll” layer from the Solid Objects Layer on the Character Layer Manager component.
- Set the Smoothed Bones on the Ultimate Character Locomotion component to 0.
- Ensure the Update Location on the Ultimate Character Locomotion is set to “Fixed Update”.
- Ensure the Animator’s Update Mode is set to “Animate Physics”.