Avindr / MxM-IssueTracking

7 stars 0 forks source link

Footstep Tags sometimes don't trigger or trigger too quickly in succession. #135

Closed Avindr closed 2 years ago

Avindr commented 2 years ago

Requires further investigation. May be related to current weighting of animations.

Avindr commented 2 years ago

Bug Fix: After reviewing the code for triggering footstep tags a bug was found and corrected on line 80 of MxMAnimator_Tags.cs. This bug would cause the tag track to be sampled at the incorrect time if the dominant animation is a looping animation. This fix will be included in the next update but can be modified as follows if the fix is needed now:

image

Other Info Footstep tags are always triggered based on the 'DominantAnimationChannel'. This is the animation with the highest weight in the motion matching stack. Due to the nature of motion matching, this dominant animation can change frequently, meaning that new footstep tags can be triggered in quick succession in some circumstances. The solution is to have a minimum timing between footsteps to reduce excessive repetition.

An option to set minimum footstep frequency will be added to the system to help prevent this. However, this logic can be performed by the user themselves upon receiving the footstep callback if need be.

Avindr commented 2 years ago

A new option for 'Min Footstep Interval' has been added to the MxMAnimator as follows:

image

This minimum interval could be changed at runtime for different locomotion speeds / types by modifying the property 'MaxFootstepInterval as shown below:

image

These improvements will be included in the next update.

Avindr commented 2 years ago

Closing this for now as I have received no further information regarding the issue. Can be re-opened if issues still occur down the line.

audonator commented 2 years ago

Looks like animTime wasn't updated correctly. Should also update animTime before range is calculated:)

image

Avindr commented 2 years ago

Cheers, yes I forgot to change the order sorry. I've fixed this and pushed an update for it. I'm uploading an update to the Unity store now too.