Visibility state for Avatar submeshes
- Last UpdatedDec 06, 2023
- 1 minute read
You must manually define the DPI setup (clothes and equipment) for custom avatars for each submesh. This determines which body parts and which clothes and pieces of equipment are visible.
Note: Ensure the submeshes are not set up initially with the human patch, because the submesh parameters are created in the second phase of the node instancing. For this reason, perform the setup with a command that must execute as soon as possible after application start.
Good practice
You should create a dedicated command to enable and disable the proper DPIs so that you are to change the DPI setup.
Code example
A code example for setting visibility.
<Command name="custom_reset_human_submeshes">
<setfield name="localAvatar_human.submesh_Arms_visible" value="false" />
<setfield name="localAvatar_human.submesh_Body_visible" value="false" />
<setfield name="localAvatar_human.submesh_ChemicalSuit_visible" value="false" />
<!-- ... -->
</Command>