Hi everybody,
AC 1.75.2 and Unity LTS 2021.3.0f1 in 2d.
We have a issue on character animate action.
Here the passages:
Our character locks on the first action "Character: animate" play custom animation "Talk look up".
Debugging the code we noticed that "Character: Animate" calls the function ActionCharAnimRun (line 283 of AnimEngine_SpriteUnity). The first time it is called, the function character.GetSpriteDirection() at line 288 returns "U", so AC plays the clip oriented to the up direction. Then, the second time this function is called, GetSpriteDirection returns "UR". Thereafter the action is stucked in a loop since at line 419 there is this check : "GetCurrentAnimatorStateInfo (action.layerInt).shortNameHash != Animator.StringToHash (clip2DNew)" and the action returns waiting the defaultPauseTime.
It looks like the character animate starts before the turning of the character is completed.
Is there a way to solve it?
Thank you very much.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Thanks for the report.
It looks like this is a case of 2 bugs at once - I can fix the issue with the animation Hash comparison, but it sounds like the sprite direction returning "U" in the first frame is a separate issue.
Does the issue persist if you precede the Actions with an "Engine: Wait" of -1s?
Hello Chris and thank you. With an "Engine: Wait" of -1s before othe actions the issue seems solved. Thank you.
Hi Chris, we tried the workaround but in some cases it doesn't work. We noticed that in these cases we need to add more Engine:Wait -1 blocks. This issue is quite dangerous so we would like to know if you scheduled a fix for it.
Thank you.
A fix for the first of the two issues - with the hash being incorrectly compared - will be included in the next release.
If you're looking to apply it beforehand, replace:
with:
I suspect that this will still cause the "Up" animation to play, however. I will need additional details in order to recreate the issue of the wrong direction being played. For a start, please share your Settings Manager and Player's full Inspector.
Hello Chris,
thank you very much. With the changes you suggested game doesn't lock, but the direction of animation is not correct (as you supposed). Here the settings and player screenshots:
Settings Manager: https://drive.google.com/file/d/1EGtmuvnB6MZN_702G6QdyeMDeJq4UwId/view?usp=sharing
Player01: https://drive.google.com/file/d/1-GXtS-wdXhz68so1M9WoCHUtY0iAD_S7/view?usp=sharing
Player02: https://drive.google.com/file/d/1WBNV8b77SAT8wh2Vxxkh-Kx6W36--eSX/view?usp=sharing
Please tell me if you can give you more info to help to reproduce it.
Thank you very much.
Thanks for the screens. Is there any difference if you:
Either together or individually?
Let's also see the manner in which your moving/turning the Player, i.e. the Hotspot Inspector / ActionList involved.