Replacing Animations - Agility Pack (Roll/Dodge)

Stonshallow

New member
I am trying to replace animations within the Roll/Dodge ability with a dive roll animation from Mixamo. I have gone back and made the changes in the Agility Demo Scene which replicate the behavior the same as what I experience in my own scene. It seems I am not getting the OnAnimatorDodgeComplete event and subsequently, AbilityIndex remains on 101/102 and is not changed to 0 to end the ability. The animation freezes at the end and does not transition to exit, seemingly due to this AbilityIndex condition. I don't believe exit time comes into play as the transition never starts. I believe it is the event that is the cause as I get the same symptoms using other included animations i.e another Opsive agility animation.

Console_Log.pngRoll_Eecute_Event.png

I would assume this is related to the ExecuteEvent on the animator, which I have put on the new animation exactly as per the old animation. Am I doing this incorrectly? I am selecting the point in the timeline, create a new event, and enter Function and String as per the original animation. Do I need to adjust any of the Root Transform Position/Rotation? I have followed these videos:

https://opsive.com/support/document...r-controller/character/abilities/new-ability/
https://opsive.com/support/document...ller/animation/animator/replacing-animations/

I am only changing the animations on the base layer as they appear only there in the AgilityDemo animator, or any animator on the character i.e DemoAnimator that I add the agility animations to in the add-ons tab of character manager.

The new animation plays fine otherwise which I can end if I set the ability stop type to button up or toggle, but this needs to happen via the condition using the manual setting so the controls work correctly. Can anyone let me know if I am doing something wrong or if any other assumptions are incorrect, or if more info is required to diagnose.

Asset 1-100.jpg
 

Justin

Administrator
Staff member
I would double check your transitions - sometimes Unity can transition to the next state before the event is executes so that event never gets executed. You can test this by moving the event up.
 

Stonshallow

New member
Thanks that's got it. I had tried that before but may have used dodgeComplete on roll and not seen the results.

Is there any way to easily extend the dive/animation distance using the roll ability or other parameters? It's a little short now, otherwise should I just edit the animation itself assuming I have time later?

I tried to map this to a double press jump input but haven't had any luck with that yet. I'm using rewired if that makes any difference.
 

Justin

Administrator
Staff member
You could change the multiplier of the animation so it's slower which would then cause the complete event to not fire as soon.
 
Top