Open jcarlosrc opened 4 years ago
Can you provide a reproduction project please? It's much faster to find your issue this way.
This is probably related to the parameter, atleast it's what i noticed:
https://user-images.githubusercontent.com/8841352/111037430-36eb2000-8424-11eb-83f8-5002f56bf877.mp4
3.2.4.rc4.mono.official
Still valid in Godot 3.5.stable.
It seems the AnimationNodeBlendTree
doesn't update itself after an AnimationNode
(in this case AnimationNodeOneShot
) changes. If this is the case, maybe it could be fixed by something in the same line of https://github.com/godotengine/godot/pull/52296.
Probably already fixed for 4.0 but it needs to be fixed for 3.x. it seems that in 3.5 it is working correctly internally (it return false after playback oneshot), so it is just the redraw timing issue.
This is currently broken in 4.x, for LinuxBSD at least. I'd have to move my project over to my Windows machine to see if it is broken there too. OneShot never unsets active after animation completes..
Can confirm I'm seeing this behavior in v4.0.2.stable.official [7a0977ce2]
Fired off a oneShot animation and it's marked as active indefinitely - no way to know when/if the animation finished via the animationtree
I thought I had this issue in v4.0.2, but I figured out later that it was my own mistake.
I had a Blend2 going to the shot box of the OneShot visual node. Then on the Blend2 I was connecting a run animation with a sword swing. What happened was that the run is a loop and the sword swing is a non loop. When I had the blend 2 moving only the arms for the sword swing and the blend_amount all the way to the swing, it would cast the animation once, and then keep the arms at the end of the animation of the swing, while the legs kept running.
On the other side of the OneShot, I had run again. The problem is that the shot connection was in fact a loop, so it never finished and never reset the arms.
Be careful not to put a loop on the shot section of the OneShot by mistake.
I had this issue on v4.1.1.stable.official [bd6af8e0e] and found that I needed to enable Sync for the oneshot to be deactivated.
Select the OneShot in AnimationTree and then check this box in Inspector:
The sync property docs say:
If false, the blended animations' frame are stopped when the blend value is 0.
If true, forcing the blended animations to advance frame.
Neither of those settings sound like they should fix this issue, so there may stil lbe a bug here.
(I experienced it while porting the 2d/skeleton project in godot-demo-projects.)
Godot version:
3.2.2-beta4
OS/device including version:
Issue description:
OneShot node in AnimationTree does not change its "valid" property to false after it finished animation. In preview it does get to false but it won't in code or inspector view.
Steps to reproduce: Create a OneShot node in an AnimationTree. Set its valid property to true in code. After its animation finishes, it is still as true.
Minimal reproduction project: