I'm developing a minigame with Godot 4.0.3 where I move the camera2D using a tween:
var tween = get_tree().create_tween()
tween.tween_property(_camera, "position", Vector2(0,-60), 0.2).as_relative().set_trans(Tween.TRANS_LINEAR).set_ease(Tween.EASE_OUT)
The camera2D is the parent of the UI nodes, so the UI should move with the camera. However, when I play this tween, the camera movement leaves the UI behind for a moment, and I don't know why.
I have tested the idea puting the UI as the children of another node and applying this tween to that node, and doing that the UI moves with it's parent like it should. So I don't know why the camera acts different. I checked that the process callback is set on iddle, as the tween and everything else, so it should be syncronized but that's not the case for some reason.
Can you guess what could be causing this? Thanks for reading!