OnMouseDown w/ Multiple Cameras/Render Texture

So I have two cameras, one that is doing a render texture to a target, and one that functions as the main camera. I have OnMouseDown events that were working perfectly before adding the second camera, and now they don’t work at all, unless I put that camera over the area where those events would occur.

Clearly the OnMouseDown function is favoring the second camera when casting rays. I don’t want this to happen. How do I switch it from second camera to main camera?

anyone? I read in a post back in 2006 that they “fixed” this as a usability issue. That leads me to believe it’s fixable, but I can’t seem to find any posts relating to it, using google.

Edit: So it’s not fixed… still need help…

bump… seriously, this problem is infuriating.

I’ve tried setting the second camera to ignore raycast, that didn’t work. I tried switching the cameras (so the one that was measuring the raycasts was the main camera), that didn’t work. They just switched which was measuring raycasts.

One is orthographic (this is the one I want taking in raycasts from OnMouse events), one is perspective, but switching that around didn’t seem to help either.

I tried changing layers, depth buffers, sizes, everything. The only thing that seems to work is disabling the second camera altogether, which I can’t do.

Could REALLY use some help on this please.

What exactly are you trying to accomplish? Also, when you do a raycast, you determine the origin; what do you have that set to?

I’m trying to use OnMouse events to do various things (OnMouseDown/Drag/Enter/Exit). All of those events only activate in relation to the perspective camera with a render texture, rather than the ortho camera with no render texture.

I am not creating any of my own raycasting mouse code. It seemed like a waste. Now I’m second guessing that =/.

Edit: And there doesn’t seem to be any way of changing which camera OnMouse events reference (in code), so I have no idea what I need to do lol