Dear all,
when my player character talks to some of our more diminutive cast, they crouch down to get at eye height with them. This is achieved by using Character Animate: Change Parameter to make a Crouch Bool true. There's an animation transition (with 0 exit time and transition duration) from idle and walking on Crouch = True that plays the animation of the player crouching, and this animation has exit time 1, so it plays in full, before reaching a crouched idle state. Crouch false takes us out of that state.
About 1 in 10 times, the crouching animation plays twice, and it looks really ugly...
Crouching has loop cycle and loop time unchecked.
Testing suggests that maybe this is related to clicking furiously on the hotspot as the character walks to point, but we can't confirm that.
Trawling general unity forums turns up lots of posts that discuss something similar with a trigger animation parameter, wherein the trigger is being called on consecutive frames and restarting the animation multiple times, but the fixes for this don't seem to help here.
Any ideas AC community?
Cheers,
Martyn
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
At what moment does the animation repeat? Is the animation asset file itself set to loop?
As it's a visual issue, can you share any media to illustrate the problem?
If there is somehow a link with Hotspot clicking, it'll be indirect - Sprites Unity Complex animation is only driven through parameter values. Your Crouch bool should only be affected by Actions. Are any clues offered by keeping the Animator window open during this time?