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] publicKinetixMask mask;[SerializeField] publicAnimator myAnimator;privatestring avatarID;//This code is from the Quickstart exampleprivatevoidAwake() {KinetixCore.OnInitialized+= OnInitialize;KinetixCore.Initialize(newKinetixCoreConfiguration() { GameAPIKey ="yourGameAPIKey", PlayAutomaticallyAnimationOnAnimators =true, EnableAnalytics =true });}privatevoidOnInitialize(){KinetixCore.OnInitialized-= OnInitialize; //Register local Player avatarID =KinetixCore.Animation.RegisterAvatarAnimator(myAnimator); //Set MaskKinetixCore.Animation.SetMaskOnAvatar(avatarID , mask);}
Runtime Avatar Mask Setup
The KinetixMask can be modified in runtime using the method SetEnabled
Example:
[SerializeField] publicKinetixMask mask;privatevoidStart() {mask.SetEnabled(HumanBodyBones.Hips,false); //Disable the hips on startmask.SetEnabled(HumanBodyBones.LeftHand,false); //Disable the left hand on startDebug.Log( mask.IsEnabled(HumanBodyBones.LeftHand) ) //Log: False}
Runtime Create Avatar Mask
privatevoidStart() {KinetixMask myMask =ScriptableObject.CreateInstance<KinetixMask>(); //Do stuff with the mask}