Follow these steps in project view :
Right Click> Create > Kinetix > AvatarMask
In the inspector, you can click on each individual node to enable (in green) or disable (in red) the bone.
Hovering the node will show the name of the bone.
For the Mask to be applied on a character, you need to call the corrisponding SetMask method.
[SerializeField] public KinetixMask mask;
[SerializeField] public Animator myAnimator;
private string avatarID;
//This code is from the Quickstart example
private void Awake()
{
KinetixCore.OnInitialized += OnInitialize;
KinetixCore.Initialize(new KinetixCoreConfiguration()
{
GameAPIKey = "yourGameAPIKey",
PlayAutomaticallyAnimationOnAnimators = true,
EnableAnalytics = true
});
}
private void OnInitialize()
{
KinetixCore.OnInitialized -= OnInitialize;
//Register local Player
avatarID = KinetixCore.Animation.RegisterAvatarAnimator(myAnimator);
//Set Mask
KinetixCore.Animation.SetMaskOnAvatar(avatarID , mask);
}
Runtime Avatar Mask Setup
The KinetixMask can be modified in runtime using the method SetEnabled
Example:
[SerializeField] public KinetixMask mask;
private void Start()
{
mask.SetEnabled(HumanBodyBones.Hips, false); //Disable the hips on start
mask.SetEnabled(HumanBodyBones.LeftHand, false); //Disable the left hand on start
Debug.Log( mask.IsEnabled(HumanBodyBones.LeftHand) ) //Log: False
}
Runtime Create Avatar Mask
private void Start()
{
KinetixMask myMask = ScriptableObject.CreateInstance<KinetixMask>();
//Do stuff with the mask
}