Download

Using Render Target to render Screen, but can't get click through right

So i’m making a game that works in a retro fashion. I need the game to render only on the left side of the screen. ***Currently i’ve found no way of doing that without a render target. ***During the gamejam, I just offset the camera to position under the UMG. This proved to be problematic when working with camera transitions and will prevent moving forward with the features in mind. It also preventing me from getting an accurate reading of how the camera is display in editor to how it is in-game…so it was a guessing game.

https://img.itch.zone/aW1hZ2UvOTIwODc4LzUyMzM0NzYucG5n/original/WFpeH+.png

Now that the game jam is over, I want to focus on optimizing it. So I’m trying out render targets. The game itself has most of the interaction in the viewport itself. So naturally, I use line traces from the camera to hotspots in the world. With Render Targets, that will have to change.

I tried this youtube tutorial on having a click through/deprojecting the click on the RT. https://www.youtube.com/watch?v=cRjpCzRkAVc

The problem here is that it uses FOVangle. So the closer your mouse is to the corners, the more it exaggerates the angle. On top of the fact its inaccurate as hell and its not precise for a retro pixel game.

So my question is, is there a better way of doing this? If not, how could I get a 1:1 pixel accurate line trace from the render texture to the scene capture 2D.

If you’re curious on how the game worked at the game jam, you can check it out at https://sbnewsom.itch.io/feducia