I’m building a 2d game and updating my camera system. I need to use the edges of the screen and find their corresponding locations in world space. I need those coordinates for stopping the camera from going through walls. I have a temporary system in place for estimating these locations but its far too complicated and inaccurate.
Something similar to the “Get Hit Results Under Cursor for Objects” node, but for under screen space is what I’m looking for.
I’ve also included a diagram for more clarity. The colored dots are the locations I need. If the camera moves closer and further from the game’s world plane, or if the screen ratio is changed these locations must be updated.
Hopefully I’ve described this well enough. Any help would be greatly appreciated.