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
The set_parallel function of SceneTreeTween explicitly states that "Tweeners appended after this method will by default run simultaneously, as opposed to sequentially."
However, this is not the case. A tween defined before the call to set_parallel appears not to run at all. Or perhaps the tween defined after set_parallel is being run prematurely thus overriding it.
# Root node is a ColorRect
var tween = create_tween()
tween.tween_property(self, "color", Color.black, 1)
tween.tween_property(self, "color", Color.white, 1)
tween.set_parallel()
tween.tween_property(self, "color", Color.red, 1)
In the above snippet, I expect the following to happen:
Tween the ColorRect to black over 1 second.
Tween the ColorRect to white over 1 second.
Enable parallel execution
Tween the ColorRect to red over 1 second.
However, the observed behavior is instead as follows:
The ColorRect is tweened to black over 1 second.
The ColorRect is tweened to red over 1 second.
In the observed behavior, the transition back to white never happens. The tween goes immediately from black to red, despite the fact that a tween to white is specified beforeset_parallel is called.
Steps to reproduce
See issue description or minimal reproduction project.
set_parallel() has the same immediate effect as parallel(), i.e. the next Tweener will run in parallel to the previously defined one. In your case white and red animations happen at the same time and red is overwriting the color, because it's animated later.
Yeah that doesn't make sense given the description. The description of set_parallel only mentions tweens set after the call. Arguably it should not have any immediate effect. Otherwise every tween defined immediately prior to the call will be parallelized which, I would guess, would be undesired in almost every case. At the very least it's not intuitive.
Godot version
3.5.1.stable.mono
System information
Windows 11
Issue description
The
set_parallel
function ofSceneTreeTween
explicitly states that "Tweeners appended after this method will by default run simultaneously, as opposed to sequentially."However, this is not the case. A tween defined before the call to
set_parallel
appears not to run at all. Or perhaps the tween defined afterset_parallel
is being run prematurely thus overriding it.In the above snippet, I expect the following to happen:
ColorRect
to black over 1 second.ColorRect
to white over 1 second.ColorRect
to red over 1 second.However, the observed behavior is instead as follows:
ColorRect
is tweened to black over 1 second.ColorRect
is tweened to red over 1 second.In the observed behavior, the transition back to white never happens. The tween goes immediately from black to red, despite the fact that a tween to white is specified before
set_parallel
is called.Steps to reproduce
See issue description or minimal reproduction project.
Minimal reproduction project
SceneTreeTween Issue Example.zip
The text was updated successfully, but these errors were encountered: