suriyun-production / battle-io-docs

This is document for Battle IO project (https://www.assetstore.unity3d.com/#!/content/101113?aid=1100lGeN)
https://suriyun-production.github.io/battle-io-docs/
1 stars 0 forks source link

Character Animations Speed Up Unexpectedly #12

Closed jonmalave closed 4 years ago

jonmalave commented 4 years ago

Hi @insthync, I found an issue with Character Animation Speed.

How to Reproduce:

1. Start a game in the editor, then Inspect your Player Character in the Scene. 2. Select and Open the Player's Animator so you can monitor the Animation State Machine and Animation Speeds at Runtime.
3. Now with the Animator and Game Scene Open side by side, begin moving your character and holding the Left Mouse Button (for continuous auto-attack). 4. You should now see the Animation State Machine updating and showing unexpected animation speeds as you Run and Attack.

Why is this a problem for me?

I modified the Camera script for Third-Person Camera style gameplay. With this unexpected animation speed increase the Animations in Third-Person view look very bad! Sometimes Attack Animations will not complete playback properly, and sometimes the Run Animation will make the player character look like it's glitching and provides a poor play experience.

Is there anything we can do to tweak this to prevent the animations from increasing when this is unwanted behavior?

jonmalave commented 4 years ago

Hi @insthync, any update on this bug? I know you are busy... but just curious if you had a chance to look at this yet, if not maybe provide an estimate time of when we can expect a fix for this maybe?

Vauxvogh commented 4 years ago

hey on that you may not have your duration set to the right amount in the weapon data for each weapon. It needs to be the duration of the actual animation.

insthync commented 4 years ago

You may try as @Vauxvogh saids Screenshot_132

jonmalave commented 4 years ago

hey on that you may not have your duration set to the right amount in the weapon data for each weapon. It needs to be the duration of the actual animation.

@insthync, Hey guys... this is totally unrelated to the problem i'm reporting. Yes, i'm aware of the animation duration time. This has nothing to do with the problem, as Yes I do have the correct animation duration time set... If I had it set incorrectly then I would see the fast animation playback happening all the time, but I don't.

Please try to visit: http://knor.io so you can see for yourself what happens. Create a game in offline mode, run around and you will see the animation speed of the run is perfectly fine. After you tap left click to attack while running you will notice the player wobbling side to side... after monitoring this using the Animator within the Editor I can see that the Animation Speed in Increasing for some odd reason after I click attack while moving. This should not be the case.

Please Note: I provided step by step instructions above on how to reproduce in the Editor. So please try the steps, and have a very close look at the player animations (maybe try a different normal humaniod character vs the default ones), and monitor the Animator in Real-time to see what happens. This has nothing to do with Animation Duration as the Side-effect of Animation Speeding up is effecting the Run Animation not only the weapons / attack animations.

insthync commented 4 years ago

Thank you, I will try it again.

insthync commented 4 years ago

As I try, I still don't get your problem, I saw attack animation speed and move speed plays normally.

jonmalave commented 4 years ago

As I try, I still don't get your problem, I saw attack animation speed and move speed plays normally.

did you try to use a different character other than the default character you are currently using in the project? It is probably very hard to see the animation playback difference on those blocky little characters. If you test on my game http://knor.io you will see the issue from third person camera.

insthync commented 4 years ago

Yes, I try your game, it's move speed or attack speed that you feel it's speed up unexpectedly?

jonmalave commented 4 years ago

Yes, I try your game, it's move speed or attack speed that you feel it's speed up unexpectedly?

OK so please try the following:

  1. Create Offline Game with No Bots So you don't have distractions
  2. Run around using WASD Keys (Run Animations is perfect)
  3. Continue pressing Run Keys now trying to Attack While Running (then stop attacking but keep pressing run)
  4. You will see the Player beigins to Wobble Side to side because the Run Animation Speeds Up after You Initiate an Attack While Running.
  5. If you stop running or maybe jump this will Reset the Run back to Normal Speed
jonmalave commented 4 years ago

Note We did not modify any of Battle.io Core Code. We only added a third person camera which does not effect the Animations.

insthync commented 4 years ago

When you try in editor, the animation state speed doesn't changing, right ? Screenshot_134

jonmalave commented 4 years ago

When you try in editor, the animation state speed doesn't changing, right ? Screenshot_134

I will record a video and show you what happens.

Vauxvogh commented 4 years ago

ohhh Jon I see what you're talking about I think I know whats happening

Vauxvogh commented 4 years ago

This has happened before to me are you trying to set different run animations for the different weapons and idles, stuff like that?

Vauxvogh commented 4 years ago

Post a screenshot of your animator set up please both bottom layer and top layer

jonmalave commented 4 years ago

This has happened before to me are you trying to set different run animations for the different weapons and idles, stuff like that?

No I am not setting up different run animations at all... I use the same Idle Animation, and Same Run Animation all the time...

jonmalave commented 4 years ago

Post a screenshot of your animator set up please both bottom layer and top layer

I'll show it in the video I will create soon...

Vauxvogh commented 4 years ago

Yeah but show your animator set up, I think I know what the problem is. Do you still have the run animation on bottom layer as well as top layer?

jonmalave commented 4 years ago

Yeah but show your animator set up, I think I know what the problem is. Do you still have the run animation on bottom layer as well as top layer?

Yes I have run animation on both layers... is that part of the issue?

jonmalave commented 4 years ago

Yeah but show your animator set up, I think I know what the problem is. Do you still have the run animation on bottom layer as well as top layer?

Yes I have run animation on both layers... is that part of the issue?

Just removed the run from the Top Layer and it does seem to solve the problem with the Run animation!!! Thanks @Vauxvogh

jonmalave commented 4 years ago

@Vauxvogh so that solves the run animation issue, but i still seem to have an issue with the attack animations sometimes not playing the complete animations. It's like 2 out of 3 times the Animation will playback perfectly fine for the Attacks but then on the 3 attack it will playback like 50% of the attack animation very odd...

jonmalave commented 4 years ago

OK @insthync @Vauxvogh I was able to resolve everything finally by adjusting the speed of the animation playback under the weapons. Also removing all the movement animations (jump, run, etc..) from the Top Layer in Animator.

Thanks for your time on this and helping me fix this all...