Tips for improving the performance
- Decrease PuppetMaster "Solver Iteration Count" (changes Rigidbody.solverIterationCount for all the muscles) to the minimum that you can work with. Less solver iterations makes the muscles weaker so you might have to increase PuppetMaster "Muscle Spring".
- "Fix Target Transforms" should be switched off when your character is animated at all times.
- "Visualize Target Pose" costs some performance in the Editor, but not in the built game.
- Leaving "Update Joint Anchors" off improves performance with the cost of simulation accuracy.
- "Angular Limits" and "Internal Collisions" reduce the workload on the physics engine when disabled.
- When using BehaviourPuppet, increase PuppetMaster "Collision Threshold". It determines how strong the collisions must be in order to be processed by the BehaviourPuppet, however, increasing the value will make the puppet's behaviour jerkier on collision.
- Reduce the number of muscles. Do you absolutely need 3 spine muscles or the feet or hand muscles?
- Reducing "Default Contact Offset" in the Physics settings reduces expensive OnCollisionStay broadcasts when using BehaviourPuppet.
- Increase the "Fixed Timestep" in Project Settings/Time to the maximum tolerable value.
- Keep your puppets away from each other. Less collisions means much less work for both the Physics engine and the PuppetMaster.
- Set PuppetMaster mode to "Disabled" for puppets when they don't need any physics simulation.
- Set PuppetMaster mode to "Kinematic" for puppets that only need the colliders for collision detection or raycasting.
- When you do not need to use any Puppet Behaviours nor get a call in case of collisions, comment out the OnCollisionEnter/Stay/Exit functions in MuscleCollisionBroadcaster.cs.
- PuppetMaster can also run a flat hierarchy ragdoll. Just right-click on the PuppetMaster header and select "Flatten Muscle Hierarchy" from the context menu.