- Home /
Use EventTriggers on GameObjects through the view of a RenderTexture.,Use Mouse EventTriggers on a scene rendered to a RenderTexture camera,
I'm rendering a scene over in a render texture. In that scene I have some interactable gameobjects that works correctly when I'm viewing them from the Main Camera, but when I set up the camera to render it on to the Render Texture, obviously it won't work.
I have two cameras. One Main, which where the UI is. One Sub, which is the camera that renders the scene to a Render Texture that I set up in my UI. When I view the scene on my MainCam, everything works perfectly. But when I view it while the SubCam is rendering to the texture, it shows the scene and all, but I can't interact with the gameobjects. I'm figuring this is because I'm not actually hovering my mouse over the objects themselves, since they're away and only rendering.
So here we have my setup. I want to be able to click on the Toons via the RenderTexture that is on the Upper Camera. Something like having a virtual pointer or something that appears on the bottom camera while I hover on the RenderTexture and captures events.
Your answer
Follow this Question
Related Questions
Masking camera image with transparent background in combination with UI 0 Answers
Player UI freezes when rendering to render texture. 1 Answer
Render texture only works in scene view 3 Answers
How to make the camera render RenderTexture if the camera is in another scene? 1 Answer
RenderTexture on RawImage requiring second camera? 0 Answers