-
Notifications
You must be signed in to change notification settings - Fork 7
PuppetMaster Integration Tutorial
This tutorial will help users get Emerald AI working with PuppetMaster. This allows AI to be knocked with down ragdoll physics and get back up.
Note: Emerald AI 3.2.1 or above is required for this tutorial.
First, users will need to import the included PuppetMaster Support (UnityPackage) file. This is located within the Emerald AI>Integrations>PuppetMaster folder. Ensure that you have PuppetMaster within your project before importing. This will add additional items to PuppetMaster Support folder.
After you have imported the PuppetMaster Support (UnityPackage) file, you should see the following. It is recommended that users test out the included PuppetMaster Example scene to see how things work and are setup.
Select the desired AI and set it up as PuppetMaster recommends. This will add additional PuppetMaster components and place your Emerald AI agent within a Puppet parent.
Find the gameobject containing your Emerald AI Editor and apply a Location Based Damage component to it. Once done, press the Get Colliders button on the Location Based Damage component. This will get all the ragdoll components that were created during the PuppetMaster setup from the step above.
Find the PMEmeraldAIExtension script and assign it to the gameobject containing your Emerald AI Editor. This stops certain functionality when the AI is unbalanced or killed. You can manually assign the PuppetMaster components or the script will attempt to automatically find them.
PuppetMaster requires certain Animation States be added to an AI's Animator Controller. All you have to do is find the Humanoid Puppet (included with PuppetMaster), select the BehaviorPuppet and BehaviorFall states, and copy them.
Next, go to your AI's (Emerald AI) Animator Controller and paste the states you just copied. These will allow the AI to play these states and their animations when needed.
Note: You will need to manually change the PuppetMaster animations through these states if you want to customize the animations (as recommended by PuppetMaster). These default animations may not be compatible with your model's rig so ensure they work correctly. If your AI cannot stand up, or goes continuously through the floor, it most likely means the animations will need to be swapped out for ones that are compatible.
Since AI who use PuppetMaster have to use the Location Based Damage (LBD) component, you will need to follow This Step if you would like to apply custom damage to your AI. AI who use LBD use different components and code for damage.
The AI should now be working with PuppetMaster. Test the AI out to ensure everything is working correctly. The AI should be able to be knocked down with ragdoll physics and get back up.
Note: Because the Layer Collision Matrix is project dependent, you may need to adjust these based on what PuppetMaster suggests. These will be visible in the form of error in the Unity Console from PuppetMaster.
- Version 3.0 Upgrade Guide
- Creating an AI through the Setup Manager
- Setting up an AI's Animations
- Creating Attack Animation Events
- Creating an AI Ability Object
- Applying an AI's Head Transform
- Applying an AI's Ranged Attack Transform
- Setting up an AI's Factions
- Setting up an AI's Layers and Tags
- Using the Combat Text System
- Setting up an AI's Optimization Settings
- Setting up an AI with Ragdoll Deaths
- Creating a Shooter AI
- Creating a Floating or Hovering AI
- Using Emerald AI's Built in Object Pool
- Using the Emerald AI Needs System
- Using Emerald AI with Crux Spawner
- Using Location Based Damage
- Using the Emerald AI Camera Shake System
- Setting up an Equippable and Unequippable Weapon
- Setting up Ranged Weapon Hand IK
- Using the Target Position Modifier
- Using the Built-in IK System
- Setting up Non-AI Targets
- Setting up Custom Damage with Emerald AI
- Using the Sound Detector System
- Setting up the Built in Health Bars and Name Text
- Behaviors and Confidence Levels
- Wander Types and Movement
- Using Factions and Faction Manager
- Detection Type and Target Picking
- Adjusting an AI Hit's Transform
- Enabling an AI's Debugging Tools