Skip to content
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

OneShot ignores fade out time when combined with TimeScale #87009

Closed
reyma24 opened this issue Jan 9, 2024 · 2 comments · Fixed by #87171
Closed

OneShot ignores fade out time when combined with TimeScale #87009

reyma24 opened this issue Jan 9, 2024 · 2 comments · Fixed by #87171

Comments

@reyma24
Copy link

reyma24 commented Jan 9, 2024

Tested versions

4.1-dev2, 4.1-dev3

I tested different versions and it breaks in v4.1.dev3.official [a67d37f].
This is probably the change that broke it: #74190 (comment)

System information

Godot v4.2.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1050 Ti (NVIDIA; 31.0.15.4629) - Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz (4 Threads)

Issue description

When combining a OneShot node with a TimeScale node (with values higher than 1) in a BlendTree, the OneShot node ignores the specified fade out time, resulting in the animation "snapping" at the end.

2024-01-09.15-36-31.mp4

TimeScale = 1 -> Works fine
TimeScale = 1.5 -> Animation snaps at the end

This exact setup worked fine in Godot 3.

Steps to reproduce

Create a BlendTree with a looping animation and a OneShot node. Combine the OneShot animation with a TimeScale and set it to a value higher than 1. (See the video above)

Minimal reproduction project (MRP)

TimeScaleBug.zip

@reyma24
Copy link
Author

reyma24 commented Jan 10, 2024

Breaks in 4.1-dev3!

I tested different versions and it breaks in v4.1.dev3.official [a67d37f].
This is probably the change that broke it: #74190 (comment)

@akien-mga akien-mga added this to the 4.3 milestone Jan 10, 2024
@TokageItLab
Copy link
Member

TokageItLab commented Jan 10, 2024

I'm working on a huge rework of AnimationTree for godotengine/godot-proposals#8083 right now, but the original fade implementations of OneShot, Transition and StateMachine are pretty hacky to begin with because they don't take original delta into account but using result of current - prev, so it will have to be re-designed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Bad
Development

Successfully merging a pull request may close this issue.

4 participants