I am making an RTS game which has a slowdown when many units are on screen at once. I have a plan to write my own camera script to speed this up.
Since I have an efficient way to find where units are without the raycast, I want to write scripts to replace the camera and check raycasts against only the few objects that my scripts will identify as in the correct area for that raycast?
Alternatively is is possible to have the camera ignore certain entities on one part of the screen, and then a different set on another part of the screen?
--Edit-- I am very grateful for people helping in anyway, but I wanted to know if this Could be done even if in my case it shouldn't be.