Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | vspin |
I’m using 2D. How do I programmatically move the default (root?) camera to a different position in my game world?
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | vspin |
I’m using 2D. How do I programmatically move the default (root?) camera to a different position in my game world?
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