Raycast on mini-map

I am using two cameras and one of them are overlapping the bigger one. The main camera is the big one and the overlapping is a mini-map i have made. I use raycast to move my character and i want to be able to press on the map to faster get to the point. But when i do i move the character to the place under the mini-map (on the main camera).

Why don’t the raycast work on the other camera?

You are probably using one of Camera’s function to build the ray you cast. Depending on weither you’re hover the mini map or not, you mustn’t use the same camera. I guess you’re using Camera.main in any case, that’s why you have that problem. Declare the variable mainCamera and minimapCamera (or whatever), assign them the proper references and test if the minimap’s rect contains the mouse.