You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
Since tweens are processed after all nodes, this means I cannot access, for example, the updated position of a tweened node before rendering the frame. As a result any effects using the tweened position in _process() will appear a frame delayed, which is unacceptable in many cases and undesirable at best.
In my case, I have made a custom particle system that I wish to place as a child of the scene that gets moved with tweens, but it needs to emit in global coordinates (same as one often does with CPUParticles). However due to the tween processing late, I can't obtain the updated value to position the particles correctly, and this leads to visual glitches.
Here's a simple video demonstration: in _process() I just set the position of the Godot logo to match that of the white square. On top we move the square with a Tween (causing obvious, unavoidable desync) and on the bottom using AnimationPlayer with adjusted process priority (works as expected).
Screen.Recording.2025-02-23.at.5.54.27.PM.mov
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Simply make tweens process before all nodes, instead of after. Then in _process() users can expect all values to be up to date for rendering, and there won't be any sync issues.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
N/A
If this enhancement will not be used often, can it be worked around with a few lines of script?
The only workaround is to not use tweens, which is hardly a solution.
Is there a reason why this should be core and not an add-on in the asset library?
It's core behavior
The text was updated successfully, but these errors were encountered:
Would changing the default behavior from "process after all nodes" to "process before all nodes" potentially be a breaking change for other users' projects? I feel like "process before all nodes" could maybe be a boolean setting to toggle, which defaults to false so that the current behavior is maintained by default.
You can make Tweens process in physics frame, which could be a workaround in this case.
Thank you for the suggestion! It's definitely not ideal, but you're right this can work in some cases. I guess the downsides are: it's unintuitive, fragile, doesn't work at all if you need your custom logic also in physics frame, and forces one to rely on physics interpolation
Would changing the default behavior from "process after all nodes" to "process before all nodes" potentially be a breaking change for other users' projects?
Potentially, though it seems like it would be very rare? I can't think of a likely scenario that would break
Describe the project you are working on
A word game with particle effects
Describe the problem or limitation you are having in your project
Since tweens are processed after all nodes, this means I cannot access, for example, the updated position of a tweened node before rendering the frame. As a result any effects using the tweened position in
_process()
will appear a frame delayed, which is unacceptable in many cases and undesirable at best.In my case, I have made a custom particle system that I wish to place as a child of the scene that gets moved with tweens, but it needs to emit in global coordinates (same as one often does with CPUParticles). However due to the tween processing late, I can't obtain the updated value to position the particles correctly, and this leads to visual glitches.
Another real example is this person who had the same problem making a grappling hook: https://www.reddit.com/r/godot/comments/1d3vcwj/processing_a_tween_after_process/
Here's a simple video demonstration: in
_process()
I just set the position of the Godot logo to match that of the white square. On top we move the square with a Tween (causing obvious, unavoidable desync) and on the bottom using AnimationPlayer with adjusted process priority (works as expected).Screen.Recording.2025-02-23.at.5.54.27.PM.mov
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Simply make tweens process before all nodes, instead of after. Then in
_process()
users can expect all values to be up to date for rendering, and there won't be any sync issues.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
N/A
If this enhancement will not be used often, can it be worked around with a few lines of script?
The only workaround is to not use tweens, which is hardly a solution.
Is there a reason why this should be core and not an add-on in the asset library?
It's core behavior
The text was updated successfully, but these errors were encountered: