I have an object, that is facing a particular direction with (for instance) a 45 degree field of view, and a limit view range. I have done all the initial checks (Quadtree node, and distance), but now I need to check if a particular object is within that view cone, (In this case to decide only to follow that object if we can see it).
Apart from casting a ray for each degree from Direction - (FieldOfView / 2)
to Direction + (FieldOfView / 2)
(I am doing that at the moment and it is horrible), what is the best way to do this visibility check?