Topic was automatically imported from the old Question2Answer platform.
Asked By
zeruno
I am trying to spawn enemies at the edge of the camera. But I do not know how to get the edges of the camera as positions. I can get the middle of the screen using Camera.GetCameraScreenCenter() and the size of the camera viewport with Camera.GetViewport().Size. But since the viewport is in pixels, I do not know how to offset the screen center by 2D units.
I think when working in 2d the pixels are the units, unless you have done scaling to your nodes.
magicalogic | 2022-12-09 03:55
@magicalogic using your insight, I was able to solve this. If you write your comment as a post, I can mark it as best answer.