Is there any convenient way to implement interaction between player and object through game world screen (render target) surface? For example, I have a ball, SceneCapture2D component (camera) pointed at this ball and mesh with material rendered from camera (screen). I want to click on ball on this screen and translate this click via line tracing from camera to original ball in game world.
I would also love to know how to do this. I’ve got a minimap of sorts using a 2d scene capture and I’d love to be able to click on those world objects through the minimap. I was on the track with something using a portal system but I haven’t explored it enough yet. I would love to see if you found a better solution.
But you “just” have to translate it step for step.
First from the Player Screen into the world. There is like a Deproject Screen to World node. You might need to use this data to trace into the world.
Then you Transform this position into the relative position of the display. You can use the invert transform position node. The Position from step 1 and the transform of the display. Now the transform will be in the relative space of the display.
Project it back into the world of the Scene Render Target. The Deproject Screen to world node will not work because it’s for the player camera.
But you can find a discussion here: Deproject Screen To World and SceneCapture2D. - #10 by SONB