godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.36k stars 21.25k forks source link

AnimationNode.blend_input time parameter is ignored when not seeking. #97971

Open Pshy0 opened 1 month ago

Pshy0 commented 1 month ago

Tested versions

*: Mesh is broken in this version. **: This version is even more broken, animation reverses when not seeking. Mesh is also broken

System information

Godot v4.3.stable - Ubuntu 24.04.1 LTS 24.04 - X11 - Vulkan (Forward+)

Issue description

AnimationNode.blend_input has a time parameter which advance the connected input node when passing seek == true. When connected to an AnimationNodeAnimation, passing seek == false, the time parameter is ignored, the connected node not only does not advance, but the time parameter has no effect.

https://github.com/user-attachments/assets/ba88b9b3-cc3a-42c1-9396-f1cb8a32b13c

Steps to reproduce

In the MRP:

Minimal reproduction project (MRP)

mrp-non-seeking-blend_input.zip

Pshy0 commented 1 month ago

Not reproducible in 4.1.4-rc3, 4.2.stable, 4.3-dev5, so this is a regression. Ill try other versions.

Pshy0 commented 1 month ago

This is what happens in 4.2.1 and 4.2.2 The cube is supposed to have plain faces, so more is broken. The animation plays in reverse in those versions when not seeking: https://github.com/user-attachments/assets/bcf5e34c-b90d-47a6-9297-d0bbb00b022e

matheusmdx commented 1 month ago

Bisecting points to #87171 as the culprit, @TokageItLab

image

TokageItLab commented 1 month ago

This is not a regression, but rather a compatibility breakdown due to a major change in the time progression algorithm.

As I have written elsewhere, gdscript lacks struct and therefore lacks the information to pass time information from gdscript to animation node. So, as soon as struct is implemented, we plan to implement an API to handle this correctly, but I think there is no currently a way to make this work correctly

image (blend_input() must return NodeTimeInfo and pass it to chained AnimationNodes, but only double values can be returned in gdscript)