- Home /
Animator Carrying Over Flip X Property During Transition?
I have an animation state machine set up for moving a top-down character, as shown below.
For my up & down animations, I have a single sprite that I am flipping back and forth using Sprite Renderer.Flip X. I am also using this property for my right animation, as it is just a mirror of my left animation. However, I've found that when transitioning from one animation to another, if Sprite Renderer.Flip X is true at the time of the transition, this will carry over to the next animation for what appears to be a single frame.
I am at a loss as to how to fix this. All of my transitions between the movement animations are controlled using an integer value and have Exit Time and Fixed Duration unchecked. How can I fix this so that the Sprite Renderer.Flip X property is changed at the same time the animation is changed, rather than being carried over from the previous animation for a frame or two?
Answer by GarbagePile · Jan 19, 2018 at 03:34 AM
In attempting to fix this issue, I discovered that my transitions were still taking a couple frames to complete. I thought that deselecting Exit Time and Fixed Duration meant the transition would be instant, but that's not the case; according to this post, Transition Duration and Transition Offset need to be set to 0 for the transition to occur within a single frame. Upon doing this for all of my transitions, the issue was resolved.