Stuck on how to fix Ability not stopping

Zaddo

Active member
Hi,

I have a configuration problem with the melee ability. It works fine when the character is not moving. But when I try to use the melee if the character is walking or running it breaks. The Animation does not play on the Character, it looks like it tries to start. But the Animation event never fires, and so the ability never gets its trigger to stop. It appears to play in the Animator, but gets stuck at the end. Once it gets stuck, only unlocking the cursor will clear the problem by forcing the ability to stop in the Use.cs OnEnableGameplayInput event.

Could you please give me some hints on what might cause this issue? Hopefully the short video gives enough of an overview to demonstrate the issue.


Edit: Changed video to show AnimatorMonitoring logging
 

Attachments

  • meleeIssue.jpg
    meleeIssue.jpg
    132.4 KB · Views: 1
Last edited:
I have spent all day trying to work this out. I still haven't fixed it.

I removed all layers except Base Layer and Full Body layer in the animator. Then I placed some debug code to call GetCurrentAnimatorClipInfo on the animator and show what clips were playing, output to the debug window whenever the clip name changes.

Strangely, when I throw a punch, even though the animator UI shows the melee clips as playing, the call to GetCurrentAnimatorClipInfo does not return these clips. It is like the internal animator engine does not play the new clips when the character is moving. Could the playing clips somehow block new animations from playing?

At the start of the video I throw two punches while standing still. The debug output shows the normal ability debug output and the clip info is also displayed. At 25 seconds, I clear the console and throw a punch while walking. Just the animator property changes for Slot0, ItemStateIndex and ItemSubstateIndex are changed, the upper body on the animation locks. The Animator UI appears to show the animations change, but the update event I have checking GetCurrentAnimatorClipInfo does not return the new clips that should be playing and so nothing is output to the console until I stop and other logging events start to output.

 
Last edited:
Are you using your own animations, or the ones coming with UCC? If you use your own, you have to add the corresponding animation events to the clips. You also need to make sure that your animator controller has all required transitions. You can monitor the parameter changes, and check whether you have corresponding transitions. This could also explain why your animator gets stuck.
 
Are you using your own animations, or the ones coming with UCC? If you use your own, you have to add the corresponding animation events to the clips. You also need to make sure that your animator controller has all required transitions. You can monitor the parameter changes, and check whether you have corresponding transitions. This could also explain why your animator gets stuck.

Hi Christian,

The animations and controller are the ones that come with UCC. It is weird how the animation appears to play in the Animator UI but doesn't play on the character, for testing, I trimmed it down to just the two layers and the animation is the bottom one, so it should override the base layer?

Thanks,
Tony
 
I did another test turning off the AnimationMonitor and UltimateCharacterLocomotion and changed the animation controller back to the standard UCC controller. So there should be no code that is affecting the animator. I then just set the animator parameters in the UI. I can make it throw punches when Idle. But if I set the animator to moving, the Punch will not play.

 
I would recommend to compare your setup to Nolan in the demo scene. Check what animator parameters are set during movement in the demo, and compare it to your setup. Also compare the body item on Nolan, and on your character.
 
Hi Christian. Thanks for the prompt reply.

I just tried it with another character. I don't have the UCC demo scenes, so no Nolan. But I have Ragdoll creator installed and it has a basic character that I tried. This character only has the animator on it in a blank scene.

I found that any value in the speed parameter breaks the animator when punching. It is really weird. This is the default UCC animator.

 
The demo scene comes with UCC, so you should have it and use it as reference. Otherwise support becomes really difficult for us.
 
Thanks Christian. I tried Nolan character, same deal. But that prompted me to just take the latest Animation Controller from the demo scene. The one I was using was about 9 months old. I noticed a few transition parameter changes. Anyway, the short response is, the new demo animation controller works perfectly. I suspect there were some bugs in the older one.

Thanks again. And I know it is a bit late, but welcome to Opsive!!
 
Top