Esempio n. 1
0
        //============================================================================================

        /**
         *  @brief Begins an event that is masked by a passed avatar mask (e.g. upper body event).
         *
         *  Note that masked events cannot use animation warping and other dynamic features that normal
         *  events use.
         *
         *  @param [MxMEventDefinition] a_eventDefinition - the event definition to use
         *  @param [AvatarMask] a_eventMask - the mask to use for the event
         *
         *********************************************************************************************/
        public void BeginEvent(MxMEventDefinition a_eventDefinition, AvatarMask a_eventMask, float a_blendRate,
                               float a_playbackRate = 1f)
        {
            if (a_eventDefinition == null)
            {
                Debug.LogError("Trying to play a layered event but the passed event definision is null.");
                return;
            }

            MxMAnimData currentAnimData = m_mxmAnimator.CurrentAnimData;

            float         bestCost         = float.MaxValue;
            int           bestWindupPoseId = 0;
            ref EventData bestEvent        = ref currentAnimData.Events[0];