-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Animation::blend_variant()
can't handle Array type
#73342
Comments
Could you provide a minimal reproduction project? This makes debugging and fixing issues much easier. |
I assume this is due to the RESET animation not being set correctly. See https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#for-better-blending. |
With RESET it appear, thanks, but it not animating poly.
Sorry about use "issues" as qa. |
Please send a Minimal reproduction project as zip. |
Also, Continuous and Discrete cannot be blended. This should display as a warning/error. If you want to blend them, set Discrete to Continuous+Nearest. |
Zero warnings or errors. And that's why I thought about it as about an issue. |
Confirmed, I think it is because blend_variant() is not defined for Arrays. BTW 3.x is seemingly working because it uses interpolate() instead of blend(), but that calculation is incorrect. |
blend_variant()
can't handle Array type
Related by #66771. |
blend_variant()
can't handle Array typeAnimation::blend_variant()
can't handle Array type
Damn, guess i'm gonna have to use frame by frame animations instead of polygon2D in 4.0. Though what software could I use for polygon animation? Or I can modify godot with the code from this PR: #66771.?, that I just noticed above. |
I tried implementing the changes from that PR to my custom godot build's animation.cpp and .h files but it failed to fix this issue, am I missing something?
I've also added ty. |
That PR implement |
@TokageItLab I was just translating it from the changes to |
I added a couple of warn prints to animation.cpp and can now confirm that case Variant::VECTOR2: {
WARN_PRINT(vformat("v2blend.%v and %v with c: %f = %v", (a.operator Vector2()), (b.operator Vector2()),c, (a.operator Vector2()) + (b.operator Vector2()) * c ));
return (a.operator Vector2()) + (b.operator Vector2()) * c; and: case Variant::PACKED_VECTOR2_ARRAY: {
WARN_PRINT("PACKED_VECTOR2_ARRAY blend.");
return blend_packed_array(PackedVector2Array(a), PackedVector2Array(b), c);
(Note: this is in the context of my scene here #75400 ) Here's a snippet of the output as the three points of the
But strangely the polygon2D's shape doesn't move at all, perhaps nothing is actually done with the returned blended array. I found out that |
Maybe the I can animate packed arrays within the AnimationPlayer so maybe the AnimationPlayer is doing something the AnimationTree is not. Or I'm completely lost and it's something else entirely.💀 |
Godot version
4rc2
System information
Windows 10, Vulcan, Intel HD graphics 620
Issue description
In Godot 3.5 AnimationTree works fine with animated polygons with Continuous update mode. But in 4.0 branch it works only with Discrete update type.
Steps to reproduce
Add Polygon2D.
Add AnimationPlayer
Animate polygon property of Polygon2D. Set Continuous update type.
Trigger that animation with AnimationTree.
And poly will disappear.
Minimal reproduction project
Scene
The text was updated successfully, but these errors were encountered: