-
-
Notifications
You must be signed in to change notification settings - Fork 22.8k
Change NodeOneShot
fading to uses self delta instead of input delta
#101792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
02068c2
to
0ab8680
Compare
NodeOneShot
fading so that it does not depend on input delta
NodeOneShot
fading so that it does not depend on input deltaNodeOneShot
fading to uses self delta instead of input delta
0ab8680
to
ba4679b
Compare
f7abf18
to
c075353
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a small change in compatibility for specific users, but I would prefer to fix the jank.
If someone has problems with this change that can't be addressed by tweaking the fadein/fadeout time, then they can file a new issue and we can consider adding a setting to bring back the old behavior.
Discussed in a call with Saracen and Tokage and iFire, and we also reviewed the code, so we agree to merge this. |
Supplemental: This changing affects the case where there is a TimeScale downstream of the OneShot. Until now, the OneShot's fade time was scaled by the downstream (left) TimeScale. This means that NodeOneShot had the problem of inverting the parent-child / master-slave relationship. Transition and StateMachine do not have this problem. This means that only OneShot was inconsistent, which is basically the change that should have been made as the bugfix. In the case of the TimeScale is placed downstream of the OneShot, there are several possible ways to preserve the old behavior.
If there are too many past projects that this would affect, we would consider this, but if this is to be made permanently optional, we need to consider whether to include a master-slave inversion in Transition and StateMachine as well, but at least we should not do that. If it were to be made optional, it would be an option with the deprecated flag like |
c075353
to
b4ac896
Compare
Thanks! |
use_self_delta_to_fade
to NodeOneShot to fade finished animation #101788Predict the time scale from the delta difference so that the fading time does not depend on the input AnimationNode's delta.
This breaks compatibility a bit because it changes the behavior of the existing fading time scaled by the downstream time scale. However, since the scaling is specific to NodeOneShot, this should bring it closer to the behavior of other AnimationNodes.
It is possible that a strange state may be produced if the timescale is changed during a fade, but since NodeTransiton and StateMachine should have the same problem, I judge that it is not a problem. The case where the timescale is changed during a transition in AtEnd with a fade is quite niche, IMO.
The problem of the fade time and end time being out of sync as in #87009, should no longer occur, but the fade duration will change, as explained below (bit change old behavior).