How do I programmatically move the default (root?) camera?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By vspin

I’m using 2D. How do I programmatically move the default (root?) camera to a different position in my game world?

:bust_in_silhouette: Reply From: Bartosz

You don’t. There is no default camera get_viewport().get_camera() == null
You can access viewports transformation e.g. get_viewport().global_canvas_transform = get_viewport().global_canvas_transform.translated(Vector2(100,0))
But I would avoid using that and just stick to using Camera2D nodes