# Puppet

![](https://2698598769-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MYpeL-Cll-FXMj9b3XC%2F-MZgFIfY0_IVWMKkuzjz%2F-MZgHXarJ3O2WrjLkWN7%2Fpuppet.PNG?alt=media\&token=de134070-a861-4af3-8704-ba77459c0cfb)

## Model

Puppet module updates Pheasy components of slave representation of a part so as it can reach master representation. Variables of this model are described bellow:

#### References

* **Part:** Slave representation of this part will be driven by this module. This reference has to be manually set.
* **Configuration:** ScriptableObject with all variables related with masses, joint forces, physics stabilization, etc. If null, the first PuppetConfiguration in `HPTK.core.defaultConfAssets` will be used. This configuration file is described in detail [here](https://jorge-jgnz94.gitbook.io/hptk/master/modules/puppet/configuration).
* **Axis Prefab:** This prefab will be passed to Pheasy components of slave representation. It can be used to make joint anchors and goals visible (also in build) for debugging purposes.

#### Control

* **Mimic Repr:** Key or name of the representation that slave representation will try to reach. This key is `AvatarModel.key` ("master") by default.
* **Force Unconnected:** Should root bones be transformed by directly modifying the Transform of their slave representation? Not recommended.
* **Edit Mode:** Should Pheasy components stay in Edit Mode? Not recommended. This option allows Pheasy components to modify their configuration in runtime which is useful for debugging but it has an impact on performance.

#### State

* **Parts:** What parts have their slave representations under control of PuppetController?
* **Bones:** What bones have their slave representations under control of PuppetController?
* **Ready:** Have all Rigidbody, Pheasy and ConfigurableJoints of slave representation been instantiated and initialized?
* **Kinematic:** Are Rigidbodies of slave representation kinematic?

## View

#### Events

* **OnPhysicsReady:** Emitted when `PuppetModel.ready` is enabled, once slave representation can be moved.
