|
Post by kampinis on Nov 27, 2018 7:35:33 GMT
Hello there. I'm really tired of finding where the bug is by myself so maybe you guys know why the thing like this happens? I have couple of problems: 1. character can rotate after first attack but can't move (of course because attacks lock movement) 2. same as previous - i have no idea, why you can roll or do actions during the second or third attack - as you can see in the video - actions come true when i press roll button during the third attack. 3. What kind of normalized time melee attack control uses? Why hitbox comes online when the attack is done? And there wasn't any changes in the original code, just used inheritants to add/change attack inputs, i've normalized strafing magnitude and added couple of IK functions - that's all. I even used animator state listener (as i suppose it should use these tags also in this state machine, right?) and it doesn't help. used random allow movement at times and still no changes. I tried to use original animator controller - no changes - character can rotate during second and third attack. I hope I'll get answer soon. Thanks for taking your time.
|
|
|
Post by Invector on Nov 27, 2018 13:42:35 GMT
You need to add the tag "Attack" to each animation state, no need to use the vAnimatorStateListener just yet since it was a prototype and it will be available in the next update replacing the original animator Tag
|
|
|
Post by kampinis on Nov 27, 2018 16:48:54 GMT
On every attack there's "Attack" tag. And same thing happens.
Again I'll mention - the same thing is with default invector settings. It seems like when the first attack is happening, everything is okay, you can rotate after set amount of time, but when the second and third attack happens - seems like IsAttacking boolean is false and you can do whatever you want even tho the attack is happenin. as you can see in the video, I tried to roll during the attack and the outcome is hilarious.
|
|
|
Post by ghosttales on Nov 28, 2018 0:14:58 GMT
"1. character can rotate after first attack but can't move (of course because attacks lock movement) "
"3. What kind of normalized time melee attack control uses? Why hitbox comes online when the attack is done?"
Having the same bug right now as well lol glad I'm not alone. I'm able to spin after my first attack, rotate freely and after my first attack the hitboxes turn on even when my attack is finished. Just waiting for a solution while I work on other aspects.
|
|
|
Post by ghosttales on Nov 28, 2018 5:31:45 GMT
UPDATE: I just fresh booted a copy of Invector in a unity project with NOTHING else installed, tried their default weapons and was still able to spin around after the first attack. Confirming it is an Invector sided bug.
|
|
|
Post by Invector on Nov 28, 2018 19:31:03 GMT
Hey guys Jorge and I look at this issue and it turns out it's not actually a bug but there are some wrongs values in the animator. You see if the Exit Time from A to B is 0.75, the value of " Allow Movement At" must be lower than the 0.75, otherwise it will be called after the A animation is played and it will disable the next animation. So if you pay attention and set fix those values, it will work as expected I will create an InfoBox in the vMeleeAttackControl to warn users about this. There are also 2 improvements that we did to have a more precise verification, in the vMeleeAttackControl, replace the OnStateExit method to this: override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { if (isActive) { isActive = false; ActiveDamage(animator, false); }
if(isAttacking) { isAttacking = false; if (mFighter != null) mFighter.OnDisableAttack(); } if (mFighter != null && resetAttackTrigger) mFighter.ResetAttackTriggers();
if (debug) Debug.Log(animator.name + " attack " + damageType + " stateExit"); }
|
|
|
Post by kampinis on Nov 28, 2018 19:49:35 GMT
thanks! it fixed the rotating during attacks but the rolling problem during attacks is still the same :D Try to open base layer in the animator and watch how rolling comes online when you do the full combo. Just spam attack and rolling and you'll see that the exiting transition is actually the end of roll animation :D
should I open a new thread about this?
|
|
|
Post by Invector on Nov 29, 2018 0:48:19 GMT
thanks! it fixed the rotating during attacks but the rolling problem during attacks is still the same :D Try to open base layer in the animator and watch how rolling comes online when you do the full combo. Just spam attack and rolling and you'll see that the exiting transition is actually the end of roll animation :D should I open a new thread about this? Hmm indeed with the wrong values in the "Allow Movement At", you can Roll in the Base Layer, but if you apply the fix mentioned above it fixes the issue with the roll or any other action. Because we did a verification that it will only do the InputHandle (which calls for all movement and actions input) if IsAttacking is false, and it is false if you apply the correct values for your animations.
|
|
|
Post by kampinis on Nov 29, 2018 7:26:10 GMT
Nice, everything now is understandable. So basically... allow movement at must be just 0.1 lower than exit time (or maybe equal?) to make sure nothing else can be done during the animation?
And last from me - what about hitboxes? Why does it come online after finishing the move? is it because exit time transition adds duration to the animation and the start normalized time goes turns it on again because it thinks the animation goes on again? I don't know how to explain this :D let's say.. animation is 1s long and the exit transition is 0.4s and it starts transitioning from 0.8 - so animation is 1.2s.. and if i set 'start damage' from 0.1 of normalized time - it goes online from 0.1 ends, let's say, at 0.6 and then comes online again at 1.1 ?
|
|
|
Post by Invector on Nov 29, 2018 13:29:51 GMT
Animations always go from 0 to 1, for example, if you have an Exit Time of 0.75 then your "Allow Movement At" and the End Damage values must be lower then that, for example, 0.7
A good way to debug that is to lower your animation speed so you can actually see exactly the when the hitbox is enabling/disabling.
|
|