Search Unity

[gif included] Bug Mysterious, Extra Frame at end of Animation

Discussion in 'Animation' started by Simon-9, Dec 22, 2018.

  1. Simon-9

    Simon-9

    Joined:
    Nov 14, 2012
    Posts:
    5
    Please help squish this bug! I am perplexed.

    TL;DR: Object wrongly appears for one frame at the animation start position, just after animation ends (see gif)

    Facts:
    - A "Sword" (cylinder) swing animation where sword fades in at the start and fades out at the end.
    - Fading is done using sword material's opacity.
    - Sword opacity = 0 when not animating.
    - Problem still occurs whether using Enabled status or opacity to make the sword appear and disappear. (turning enabled status on at animation start, and off at animation end, the problem occurred exactly the same way with the cylinder flashing in for one frame at end of animation, at the initial sword position)

    Please see attached images for animation settings and GIF

    Issue:
    - After animation ends, cylinder appears for one frame at full opacity then disappears. I did not want this, and did not tell it to do this (afaik).
    - The cylinder position when it erroneously appears is at the initial position. Sometimes it appears at a position about 1/3 of the way along the animation arc.

    See the one problem frame at the end where the cylinder appears after the swing animation:
    https://forum.unity.com/attachments/cylinder_animation_glitch_extra_frame-gif.348961

    https://forum.unity.com/attachments/cylinder_animation_and_alpha_setting-png.348958

    https://forum.unity.com/attachments/cylinder_animation_transition_settings-png.348964

    What's going on? How to fix? I would love any and all help you can give.

    Please let me know if you require any more information to resolve this.


    TL;DR: Object wrongly appears for one frame at the animation start position, just after animation ends
     

    Attached Files:

    Last edited: Dec 22, 2018